This is a migrated thread and some comments may be shown as answers.

RadGridView RowHeight

8 Answers 3843 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dario
Top achievements
Rank 1
Dario asked on 23 Sep 2014, 03:49 PM
Hello,

I'm trying to set the rows height for my GridView but I can't find a method...

How can I set the custom rowheight for each row?

I readed lot of thread on this forum but the properties that they use seems to not exists...

May be the forum thread are old and that they are no more valid for the 2014 telerik version...

Thanks
Ciao

8 Answers, 1 is accepted

Sort by
0
Accepted
Mark
Top achievements
Rank 2
answered on 23 Sep 2014, 07:39 PM
You have to use code Dario...

RadGridView.TableElement.RowHeight = 20
0
Accepted
Stefan
Telerik team
answered on 24 Sep 2014, 06:39 AM
Hi guys,

Using the approach that Mark suggested will set the height for all rows in the grid. 

If you want to set the height on per row basis, here is how to do it:
radGridView1.Rows[0].Height = 100;

Of course, both approaches will work only when AutoSizeRows is false.

@Mark, thank you for the community effort. I have updated your Telerik Points for this.

Regards,
Stefan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Dario
Top achievements
Rank 1
answered on 24 Sep 2014, 07:22 AM
Thanks you all, it works properly 

Ciao
0
BestCoder
Top achievements
Rank 1
answered on 02 Nov 2015, 10:00 PM

Setting the row height using RadGridView.TableElement.RowHeight = xx appears to no longer work when code is present in the generated designer file after configuring the new column groups feature added in Q3 2015 (see http://www.telerik.com/help/winforms/gridview-viewdefinitions-column-groups-view.html). Anyone have any suggestions?

 

columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup1);
columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup2);
columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup3);
columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup4);
columnGroupsViewDefinition1.ColumnGroups.Add(gridViewColumnGroup5);
this.MyGridMasterTemplate.ViewDefinition = columnGroupsViewDefinition1;​

0
Stefan
Telerik team
answered on 03 Nov 2015, 09:34 AM
Hello Danny,

The API mentioned, does not concern the grid rows height, when columns group view definition is used. In fact, I don't think it was ever taken into consideration (I checked with a couple older versions).

To set all rows height, you can iterate the rows and set each RowInfo's RowHeight property as shown in my previous post in this thread.

Other means to size the layout are the RowSpan property of a group:
columnGroupsViewDefinition.ColumnGroups[0].RowSpan

and the MinHeight property of a row in the column layout:
columnGroupsViewDefinition.ColumnGroups[0].Rows[0].MinHeight

I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Ramees
Top achievements
Rank 1
answered on 29 Feb 2016, 06:08 AM

Hello,

this.radGridView1.TableElement.RowHeight has stopped working after upgrading to version 2016.1.216.40

 Thanks

Ramees

0
Stefan
Telerik team
answered on 29 Feb 2016, 08:54 AM
Hello Ramees,

Thank you for writing.

Could you please provide a sample where this is not working? Also, are you using ColumnGroupsViewDefinition or you are using the default row layout?

I am looking forward to your reply.

Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Chirag
Top achievements
Rank 1
answered on 11 Apr 2016, 07:12 AM

Thanks

 

Tags
GridView
Asked by
Dario
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 2
Stefan
Telerik team
Dario
Top achievements
Rank 1
BestCoder
Top achievements
Rank 1
Ramees
Top achievements
Rank 1
Chirag
Top achievements
Rank 1
Share this question
or