473,326 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to control row height in datagrid

Hi, I have a need of controlling the row height of the individual rows in a
data grid. The row height will be adjusted after the datagrid is filed with
data and the height will be different for each row. How do I loop trough the
rows and set the row height.

TIRislaa
Nov 21 '05 #1
3 1715
Hi,

I would recommend that you do not set each row a different height.
Each time you sort or add a new record the datagrid goes back to the default
row height and it will not let change it back. I would set the set the
preferredrowheight to the new height and manually set all the columns to the
new height. Here is a link to a sample I wrote. Take a look at the multiline
column.

http://www.onteorasoftware.com/downl...redcolumns.zip

Ken
-------------------------
"Tor Inge Rislaa" <no*************@rislaa.no> wrote in message
news:0i*******************@news4.e.nsc.no...
Hi, I have a need of controlling the row height of the individual rows in a
data grid. The row height will be adjusted after the datagrid is filed with
data and the height will be different for each row. How do I loop trough the
rows and set the row height.

TIRislaa

Nov 21 '05 #2
Hi couldn't open the project. It might be because it is developed in a newer
version of .Net (I am at 2002). Anyway I just need a simple solution to run
trough my rows. The grid will never be of more than 10 rows so a simple run
trough wouldn't be a problem. When the datagrid is filled with data the user
will not sort it.

TIRislaa

"Ken Tucker [MVP]" <vb***@bellsouth.net> skrev i melding
news:uS*************@TK2MSFTNGP14.phx.gbl...
Hi,

I would recommend that you do not set each row a different height.
Each time you sort or add a new record the datagrid goes back to the default row height and it will not let change it back. I would set the set the
preferredrowheight to the new height and manually set all the columns to the new height. Here is a link to a sample I wrote. Take a look at the multiline column.

http://www.onteorasoftware.com/downl...redcolumns.zip

Ken
-------------------------
"Tor Inge Rislaa" <no*************@rislaa.no> wrote in message
news:0i*******************@news4.e.nsc.no...
Hi, I have a need of controlling the row height of the individual rows in a data grid. The row height will be adjusted after the datagrid is filed with data and the height will be different for each row. How do I loop trough the rows and set the row height.

TIRislaa

Nov 21 '05 #3
Hi,

Here is a free utility to convert vs.net 2003 to vs.net 2002 format
http://www.codeproject.com/macro/vsconvert.asp
Ken
---------------------
"Tor Inge Rislaa" <no*************@rislaa.no> wrote in message
news:JY*******************@news4.e.nsc.no...
Hi couldn't open the project. It might be because it is developed in a newer
version of .Net (I am at 2002). Anyway I just need a simple solution to run
trough my rows. The grid will never be of more than 10 rows so a simple run
trough wouldn't be a problem. When the datagrid is filled with data the user
will not sort it.

TIRislaa

"Ken Tucker [MVP]" <vb***@bellsouth.net> skrev i melding
news:uS*************@TK2MSFTNGP14.phx.gbl...
Hi,

I would recommend that you do not set each row a different height.
Each time you sort or add a new record the datagrid goes back to the default row height and it will not let change it back. I would set the set the
preferredrowheight to the new height and manually set all the columns to the new height. Here is a link to a sample I wrote. Take a look at the multiline column.

http://www.onteorasoftware.com/downl...redcolumns.zip

Ken
-------------------------
"Tor Inge Rislaa" <no*************@rislaa.no> wrote in message
news:0i*******************@news4.e.nsc.no...
Hi, I have a need of controlling the row height of the individual rows in a data grid. The row height will be adjusted after the datagrid is filed with data and the height will be different for each row. How do I loop trough the rows and set the row height.

TIRislaa


Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Billy Jacobs | last post by:
I have created a DataGridColumnDatePicker Component so that I can put a datetimepicker control in my datagrid. It almost works. When I put my mouse in the cell it changes to a datetimepicker...
8
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3"...
2
by: Carlo Marchesoni | last post by:
I have a very basic question using the DataGrid. What I want to achieve is controlling the size of it (specially the height of the rows). The DataGrid adjusts the row size according to the amount...
2
by: tshad | last post by:
This is related to my other Hiding datalistitems problem that I can't seem to solve. I have tried different methods which all seem to work only partially. I decided to try to use a User...
0
by: Chubby Arse | last post by:
Hi all, I have a control, that basically is my own version of the datagrid, except that is renderers purely readonly tabular information. When the control is rendered to the designer, I can...
5
by: sianan | last post by:
I have an ASP.NET custom control, which contains a DataGrid with checkboxes. I am trying to figure out how to retrieve the selected records, based on the checkbox's checked state. I want to send...
0
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of...
15
by: Hamed | last post by:
Have I posted the message to wrong newsgroup? Or Does the question is so much strage? Would someone please kindly direct me to a true newsgroup or resource? Best Regards Hamed
7
by: Localbar | last post by:
hi all, my problem is...i have 2 textbox for user input no. of row and no.of column. After user input, the datagrid will show what user input....for example: user input 5 rows and 6 column....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.