Gridbuilder Scrollbar Functionality

2 posts, 0 answers
  1. Scott
    Scott avatar
    7 posts
    Member since:
    Apr 2016

    Posted 17 May Link to this post

    Hello, I'm trying to figure out the scrollbar functionality in Gridbuilder. In my particular case, as shown in the code below, I have a toolbar and some columns. The scrollbar is scrolling the entire grid, header and all. There appears to be another scroll bar for just the data but it is greyed out. What I'm trying to do is just get the data to scroll while leaving the header stationary. Any ideas? 

     

        .Name("Generic")
        .Columns(columns =>
        {
            columns.Bound(p => p.Name);
            columns.Bound(p => p.Desc);
        })
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model =>
            {
                model.Id(p => p.ID);
            })
            .Create(create => create.Action("Create")
            .Read(read => read.Action("Read")
            .Update(update => update.Action("Update")
            .Destroy(destroy => destroy.Action("Delete")
            .PageSize(20)
        )
        .Sortable(sortable => sortable
            .AllowUnsort(true)
            .SortMode(GridSortMode.SingleColumn))
        .ToolBar(toolbar =>
        {
            toolbar.Template(@<text>
            @item.CreateButton("Add")
            @item.SaveButton("Save", "Cancel")
            </text>);
        })
    )

  2. Scott
    Scott avatar
    7 posts
    Member since:
    Apr 2016

    Posted 18 May in reply to Scott Link to this post

    Actually, I figured it out already. I was missing the following code which sets the height of the grid:

    .HtmlAttributes(new { style = "height: 29em;" })

  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top