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

When I add columns the scroll bar doesnt scroll the columns.

Thread ID:





121891 Feb 4,2016 09:37 AM UTC Feb 5,2016 09:06 AM UTC ASP.NET MVC 2
Tags: Grid
Asked On February 4, 2016 09:37 AM UTC


As in the subject heading i add columns to the grid using the following code i cant scroll properly.

function addColumns(cols)
        colWidth = 100;
        var gridObj = $("#grid").data("ejGrid");
        for (var i = 0; i < cols.length; ++i)
            gridObj.columns(cols[i], "add");
            gridObj.resizeColumns(cols[i], colWidth);
            width += 100;


however now when i scroll only the grid with the data values scrolls. I attached images of what it looks like.

Also here is the original table.

        .ScrollSettings(scroll => { scroll.Height(300).Width(970); })
        .Columns(col =>

How can i add the columns correctly so that they will still scroll?


Attachment: scroll_issue_cfccc013.zip

Replied On February 4, 2016 08:55 PM UTC

So I finally got it working, sort of.

instead of using the api I make the grid in a partial and ajax it in adding columns in the razor view with code like this:

        .ScrollSettings(scroll => { scroll.Width(ViewBag.width); })
        .Columns(col =>
            col.Field("name").HeaderText("Geo Item").IsPrimaryKey(true).TextAlign(TextAlign.Left).Width(75).Add();
            if (ViewBag.cols != null)
                foreach (var x in ViewBag.cols)

where cols is a List<string> and width is a counter that i incremented by 150 so the table grows by 150 for each column.

Jayaprakash Kamaraj [Syncfusion]
Replied On February 5, 2016 09:06 AM UTC

Hi Matheu, 

Thanks for the update.

Please get back to us if you need any further assistance.  


Jayaprakash K.


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