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. Image for the cookie policy date

How can we change the default row height of 30px?

Hi thereWe are using your MVC TreeGrid control, and it is really good for what we are trying to do.However each row in the grid has a lot of unnecessary white space, which we are trying to reduce so we can fit more information on the page at once.I see that each row has a default height of 30px.  How can we change this to another value, for example 20px, to reduce the total vertical size of the grid?Thank you!

3 Replies

JD Jayakumar Duraisamy Syncfusion Team April 6, 2017 09:02 AM UTC

Hi Travis, 
 
Thanks for contacting Syncfusion support. 
In TreeGrid control we can specifies the height of rows by using “rowHeight” property. We can define the “rowHeight” value in integer and it will consider the value in terms of pixels 
We have prepared a sample and rendered TreeGrid rows in 20px height, please refer following code snippet, 
@(Html.EJ().TreeGrid("Treecontainer") 
  //… 
  .RowHeight(20) //Set Row Height 
) 
Pease find the sample from below link. 
 
Please let us know if you require further assistance on this. 
Regards, 
Jayakumar D 



TB Travis Beesley April 6, 2017 08:39 PM UTC

Thanks, that's great!


JD Jayakumar Duraisamy Syncfusion Team April 7, 2017 04:20 AM UTC

Hi Travis, 
We are glad that your requirement has been met. Please let us know if you need any other assistance. 
Regards, 
Jayakumar D 


Loader.
Up arrow icon