We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Dynamically Adjust Row Height Of DataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

691 Jul 30,2002 10:17 PM Aug 8,2002 11:08 PM Windows Forms 4
loading
Tags: FAQ
Konrad Ferguson
Asked On July 30, 2002 10:17 PM

I really enjoy this site and find it extremely useful in my work. Ok, my problem is that I have a DataGrid with many records (rows). I want some rows to be height 'X' some rows to be height 'Y' etc. How do I do this? From my experience PreferedRowHeight adjusts the hieght of all rows in the DataGrid, but I want to specify the height of each individual row. Thanks so much in advance! You guys are the best!

P
Replied On August 1, 2002 05:49 AM

Dude you are really NOT reading through the rest of the posted messages.Read, that might help you!

P
Replied On August 1, 2002 09:48 AM

Here is the solution anyway. Make a DataView and assign table to it. Set the data grid source to the DataView. Now use DataView.RowFilter

Administrator [Syncfusion]
Replied On August 4, 2002 09:06 PM

Dude, I bet you get bonus points in the customer service department! > Dude you are really NOT reading through the rest of the posted messages.Read, that might help you!

Konrad Ferguson
Replied On August 8, 2002 11:08 PM

Thanks for trying to help (though you were frustrated at the time, but it's okay); however, I don't think this is what I need. I did read the other messages, such as: 1.) Syncfusion Forums Home >> Windows Forms FAQ >> Subject: resize datagrid rows programatically By george harig at 5/10/2002 11:35:29 AM I need to resize the rows of a datagrid. The method I am using now is to clear the table style, set the prefered row size then add (re-add)the table style. Is there a better way? Thank you George Harig By Clay Burch at 5/13/2002 1:36:49 AM I don't know of a different way to do this. Evidently, the row height is set during databinding, and then again when a tablestyle is applied, and there appears to be no way to get at row heights at other times. Microsoft Engineer Lion Shi made this comment in a news group posting in response to a question about how to programmatically resize a row. "We cannot customize the properties of a specific row pragmatically. At this point, there is no way to work around this design limitation." Of course, there are commercial grids, such as Syncfusion's Essential Grid, where you can resize individual rows at any time. ******* As well as: 2.) Syncfusion Forums Home >> Windows Forms FAQ >> Subject: DB Grid - Hide a row depending upon contents of a cell? By Peter at 7/25/2002 6:48:49 AM Hi Clay, Thank you for your previous responces. Please if you can help with this. How do I loop through all rows in my DBGrid and hide some of them or change their Hight=0 depending upon the contents of a cell? Thank you. By Clay Burch at 7/27/2002 3:04:43 AM I don't know of a way to programatically set the height of a row. You could possibly do this using the Filter property on a DataView, and bind your datagrid to this filtered Dataview when you want the rows gone, and then rebind it to the full table when you want them to show... **** None of these messages help me adjust the height of a row programatically. Clay said, "I don't know of a way to programatically set the height of a row", so I decided to ask if anyone else did. Now, I'm only a college student learning this stuff (for a program I'm doing with my friend) when I'm not out with friends or studing for my summer school class, so I most likely do not know as much as you. I can totally understand that you may have been angry because it appeared I did not read the other posts, so it's ok. Anyways, could you tell me how to use RowFilter to change the height of a row. I only see its use in filtering rows, but not in changing the row height (I've read the Microsoft documentation - am I missing something?). Thanks a lot, Konrad > Here is the solution anyway. > Make a DataView and assign table to it. Set the data grid source to the DataView. Now use DataView.RowFilter >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;