5 Answers, 1 is accepted
0
Hi Julien,
Thank you for contacting us. Instead of iterating over all the rows, you can handle CreateRow event and set the MinHeight property of each row. Please, note that you should subscribe to this event before filling the TableAdapter.
I hope this is helpful. If you have further questions, do not hesitate to contact me back.
All the best,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for contacting us. Instead of iterating over all the rows, you can handle CreateRow event and set the MinHeight property of each row. Please, note that you should subscribe to this event before filling the TableAdapter.
| public Form1() |
| { |
| InitializeComponent(); |
| this.radGridView1.CreateRow += new Telerik.WinControls.UI.GridViewCreateRowEventHandler(radGridView1_CreateRow); |
| } |
| void radGridView1_CreateRow(object sender, Telerik.WinControls.UI.GridViewCreateRowEventArgs e) |
| { |
| e.RowInfo.MinHeight = 40; |
| } |
I hope this is helpful. If you have further questions, do not hesitate to contact me back.
All the best,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dev J
Top achievements
Rank 1
answered on 08 Dec 2009, 01:58 PM
Why does this not work with Group rows? I'm doing this:
The other rows work fine and obey the MinHeight of 40, but the Group rows apparently ignore the MinHeight and still autosize much smaller than 50.
Thanks,
-DJ
| void radGridView1_CreateRow(object sender, Telerik.WinControls.UI.GridViewCreateRowEventArgs e) |
| { |
| If TypeOf e.RowInfo Is GridViewGroupRowInfo Then |
| e.RowInfo.MinHeight = 50 |
| Else |
| e.RowInfo.MinHeight = 40; |
| End If |
| } |
The other rows work fine and obey the MinHeight of 40, but the Group rows apparently ignore the MinHeight and still autosize much smaller than 50.
Thanks,
-DJ
0
Hi Dev J,
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
RadGridView uses virtualization and creates visual row elements only for the rows that are currently visible on the screen. CreateRow event fires only when visual rows are created. Because of this, setting the MinHeight when handling CreateRow event is not correct. A better option is to iterate the Rows collection.
Group rows are not automatically sized and their size can't be changed by using the UI. You should set the GroupHeaderHeight property instead:
Me.RadGridView1.GridElement.GroupHeaderHeight = 50I hope this helps. Should you have any further questions, please write back.
All the best,
Jackthe Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dev J
Top achievements
Rank 1
answered on 09 Dec 2009, 03:16 PM
Hey Jack,
Thanks for the reply. Unfortunately, I tried your suggestion and nothing changes. You did catch the fact that I have AutoSizeRows = True?
-DJ
Thanks for the reply. Unfortunately, I tried your suggestion and nothing changes. You did catch the fact that I have AutoSizeRows = True?
-DJ
0
Hi Dev J,
I tested the solution with our latest release - Q3 2009 SP1. Now I noticed that you are using an old version of RadControls for WinForms. You have to update your version so that group row height can be customized. I will be glad to assist you if something pops out when switching to the new version.
Sincerely yours,
Jack
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I tested the solution with our latest release - Q3 2009 SP1. Now I noticed that you are using an old version of RadControls for WinForms. You have to update your version so that group row height can be customized. I will be glad to assist you if something pops out when switching to the new version.
Sincerely yours,
Jack
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.