3 Answers, 1 is accepted
0
Hello Andy,
The row height in RadGridView can be set only manually. You can do this by modifying any existing theme through the Visual Style Builder or through code. The following code snippet demonstrates how to change the height of the header row and how to specify the height of all other rows:
It is possible also to change the height of a specific row. Consider the code snippet below:
Don't hesitate to contact us if you have other questions.
All the best,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The row height in RadGridView can be set only manually. You can do this by modifying any existing theme through the Visual Style Builder or through code. The following code snippet demonstrates how to change the height of the header row and how to specify the height of all other rows:
DirectCast(Me.RadGridView1.GridElement, Telerik.WinControls.UI.GridTableElement).RowHeight = 55 |
DirectCast(Me.RadGridView1.GridElement, Telerik.WinControls.UI.GridTableElement).TableHeaderHeight = 40 |
It is possible also to change the height of a specific row. Consider the code snippet below:
AddHandler RadGridView1.RowFormatting, AddressOf RowFormatting |
Private Sub RowFormatting(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RowFormattingEventArgs) |
e.RowElement.RowInfo.Height = 30 |
End Sub |
Don't hesitate to contact us if you have other questions.
All the best,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
santosh
Top achievements
Rank 2
answered on 24 Mar 2008, 08:28 AM
Hi Telerik,
my applicaiton throw excpetion
"An unhandled exception of type 'System.Reflection.' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an invocation."
when try to update row height in RadGridView in RowFormatting handler.
private void radGridView1_RowFormatting(object sender, RowFormattingEventArgs e)
{
e.RowElement.RowInfo.Height = 30;
}
is there other option to change the row height for RadGridview in design or in code?
i am using
1. Rad beta verison for winForms.
2. .Net 2005
thanks,
Santosh kumar
0
Hello santosh,
Thank you for reporting this issue.
To set the row height you can use the RowHeight property of the GridTableElement. Refer to the following code sample:
We could not reproduce the issue reported by you. We are not quite sure, if it is related directly with RadGridView, because RadGridView doesn't use reflection. Please open a support ticket and send us your application to help us investigate the causes further.
Do not hesitate to contact me, if you have other questions.
Regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Thank you for reporting this issue.
To set the row height you can use the RowHeight property of the GridTableElement. Refer to the following code sample:
((GridTableElement)this.radGridView1.GridElement).RowHeight = 30; |
We could not reproduce the issue reported by you. We are not quite sure, if it is related directly with RadGridView, because RadGridView doesn't use reflection. Please open a support ticket and send us your application to help us investigate the causes further.
Do not hesitate to contact me, if you have other questions.
Regards,
Jack
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center