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

Freeze column header

Hi,

Is there a way of setting the columns headers in a grid to stay at the top when the grid is scrollable?

I know there is a way to freeze a row, however we just would like to freeze the header row.

Thanks,
Steve

5 Replies

PK Prasanna Kumar Viswanathan Syncfusion Team May 5, 2017 12:19 PM UTC

Hi Stephen,
Thanks for contacting Syncfusion support.
 In this we suspect that you are expecting Frozen columns feature in Grid. So, please confirm with below online sample and documentation whether you are expecting this type of feature in Grid. 
Regards,
Prasanna Kumar N.S.V




SA Stephen Armstrong May 7, 2017 09:25 PM UTC

Hi Prasanna,

Thanks for getting back to me.

As I mentioned in my original question, we are hoping to not freeze the rows or columns, but freeze the columns headers at the top (see attached file for an example).

Cheers,
Steve

Attachment: Freeze_Row_Header_18004e60.zip


PK Prasanna Kumar Viswanathan Syncfusion Team May 10, 2017 11:46 AM UTC

Hi Steve,


Sorry for the delay.


To freeze the column headers at the top while moving thehorizontal scrollbar, we need to remove the "e-headercontent" class from the grid header.


In below sample we achieved this usingdataBoundevent of ejGrid. This event will be triggered when the grid is bound with data during initial rendering.


Find the code example and sample:


@(Html.EJ().Grid("FlatGrid")
.Datasource((IEnumerable)ViewBag.datasource)
---------------------------------------
.ClientSideEvents(eve => eve.DataBound("dataBound"))
.Columns(col =>
{
--------------------------
)


Sample:http://www.syncfusion.com/downloads/support/forum/130298/ze/SyncfusionMvcApplication1978659547

Note: when we freeze the column headers while moving the horizontal scrollbar, the misalignment will occur.

Refer to the Help document for the dataBound event.



https://help.syncfusion.com/api/js/ejgrid#events:databound



Regards,

Prasanna Kumar N.S.V



SA Stephen Armstrong May 25, 2017 12:26 AM UTC

Hi Prasanna,

Just to confirm, we need to freeze the column headers when we scroll with the vertical scrollbar.

Thanks,
Steve


PK Prasanna Kumar Viswanathan Syncfusion Team May 25, 2017 09:43 AM UTC

Hi Steve, 

By default the column headers will be freeze when we scroll the vertical scrollbar. For your convenience we attached a video and please download the video from the following link 


If possible, please provide the video demonstration of an requirement.  

Regards, 
Prasanna Kumar N.S.V 
 


Loader.
Up arrow icon