4 Answers, 1 is accepted
0

Fakhru
Top achievements
Rank 2
answered on 05 Sep 2009, 02:23 AM
Any solutions ?
I'm trying to upgrade all my DataGridView to RadGridView.
Best Regards,
Fakhru Rahman
I'm trying to upgrade all my DataGridView to RadGridView.
Best Regards,
Fakhru Rahman
0
Hi Fakhru,
Thank you for writing. I think that if you use min height for rows, RadGridView will look closer to the standard DataGridView. Please, review the following code-block:
Hope this helps. Do not hesitate to contact me again if you have other questions.
Sincerely yours,
Martin Vasilev
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.
Thank you for writing. I think that if you use min height for rows, RadGridView will look closer to the standard DataGridView. Please, review the following code-block:
private void Form1_Load(object sender, EventArgs e) |
{ |
this.radGridView1.Columns[1].WrapText = true; |
this.radGridView1.AutoSizeRows = true; |
} |
void radGridView1_CreateRow(object sender, Telerik.WinControls.UI.GridViewCreateRowEventArgs e) |
{ |
if (e.RowInfo is GridViewTableHeaderRowInfo) |
{ |
e.RowInfo.MinHeight = 30; |
} |
else |
{ |
e.RowInfo.MinHeight = 20; |
} |
} |
Hope this helps. Do not hesitate to contact me again if you have other questions.
Sincerely yours,
Martin Vasilev
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.
0

Fakhru
Top achievements
Rank 2
answered on 12 Sep 2009, 12:12 PM
That code was I'm looking for.
But when there's some not displayed row, the first not displayed row was not effected with that MinHeight value.
Sorry, I have bad English.
If you can't understand what I mean, maybe I can send some screenshoot of it, :P.
Best Regards,
Fakhru Rahman.
But when there's some not displayed row, the first not displayed row was not effected with that MinHeight value.
Sorry, I have bad English.
If you can't understand what I mean, maybe I can send some screenshoot of it, :P.
Best Regards,
Fakhru Rahman.
0
Hello Fakhru,
Thank you for getting back to me.
After some testing I have to admit that we have an issue with MinHeight property, and that's why the provided code is not working as expected. I have logged this in our bug tracking system and it will be addressed for some of the next releases. Currently, you can try to use CellElement Padding to achieve similar result. Please, review the code-block below:
Write me back if you need additional assistance.
Kind regards,
Martin Vasilev
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.
Thank you for getting back to me.
After some testing I have to admit that we have an issue with MinHeight property, and that's why the provided code is not working as expected. I have logged this in our bug tracking system and it will be addressed for some of the next releases. Currently, you can try to use CellElement Padding to achieve similar result. Please, review the code-block below:
private void Form1_Load(object sender, EventArgs e) |
{ |
this.radGridView1.Columns[1].WrapText = true; |
this.radGridView1.AutoSizeRows = true; |
} |
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e) |
{ |
e.CellElement.Padding = new Padding(6); |
} |
Write me back if you need additional assistance.
Kind regards,
Martin Vasilev
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.