Wrong Row Height with frozen columns

Hello, 
In my grid I'm freezing the first 4 columns.
The first column has a template that goes on 2 lines. Rows on the right of the frozen line are not respecting the height of the column on the left.


I solved by adding a 0px 5th column like this:
col.HeaderText("").Width("0").Template("-<br /><small>-</small>").Add();

Column on the right are now the same height as column on the left.

Thanks


3 Replies

DR Dhivya Rajendran Syncfusion Team April 23, 2018 12:06 PM UTC

Hi Daniele, 

Thanks for your update. 

We have analyzed your query and we suspect that you have set height for the column template in Grid so that the frozen(right) content height is adjusted based on the template height but in movable(left) content does not contain template so the default height is applied, to resolve the problem you can use RowHeight property in your application. Kindly refer to the below code example and documentation link for more information. 

   @Html.EJS().Grid("RowHeight").DataSource((IEnumerable<object>)ViewBag.dataSource).RowHeight(60).Columns(col => 
   { 
       col.Field("OrderID").HeaderText("Order ID").Width("120").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Right).Add(); 
       col.Field("CustomerID").HeaderText("Customer Name").Width("150").ShowInColumnChooser(false).Add(); 
       col.Field("ShipCountry").Visible(false).HeaderText("Ship Country").Width("150").Add(); 
       . . . . . . . . 
   }). Render() 



If we misunderstood your requirement, kindly provide more information about your requirement or grid code for further analysis. 

Regards, 
R.Dhivya 



DA Daniele April 24, 2018 01:35 PM UTC

Hello,
RowHeight didn't fix the problem (with rowtemplate):

Here's my template for row 1, left from the freeze point
col.Field("Produttore").HeaderText("Producer").Template("${Producer}<br /><small>${City}").Width("230").Add();

And here's the result with RowHeight(120)

Also, rowheight causes the headers also to respect the new height, and the result is not good, graphically:

The only fix is to add a 0px column.


DR Dhivya Rajendran Syncfusion Team April 25, 2018 02:08 PM UTC

Hi Daniele, 
 
Thanks for your update. 
 
Query1: RowHeight didn't fix the problem (with rowtemplate)  
 
Row template feature is not supported in frozen rows and columns. Please refer to the below limitations. 
 

Query2: rowheight causes the headers also to respect the new height, and the result is not good, graphically? 
 
You can use rowDataBound event to set the rowHeight property, it does not cause the rowHeight on header in Grid. Please refer the below documentation link for more information. 
 

Query3: here's the result with RowHeight(120) 

Could you please provide grid code example or more information regarding your problem, it will be very helpful for further analysis of your query. 

Regards, 
R.Dhivya 


Loader.
Up arrow icon