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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Freeze column header

Thread ID:

Created:

Updated:

Platform:

Replies:

130298 May 4,2017 10:41 PM UTC May 25,2017 09:43 AM UTC ASP.NET MVC 5
loading
Tags: Grid
Stephen Armstrong
Asked On May 4, 2017 10:41 PM UTC

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

Prasanna Kumar Viswanathan [Syncfusion]
Replied On 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



Stephen Armstrong
Replied On 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

Prasanna Kumar Viswanathan [Syncfusion]
Replied On 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


Stephen Armstrong
Replied On 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

Prasanna Kumar Viswanathan [Syncfusion]
Replied On 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 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;