I´ve seen a lot of similar questions, but none like this, so here's the catch.
I have a AjaxControlToollkit tab, and inside it, i have a GridView. I want that GridView to have a scrollbar, so i can navigate
I can add a scrollbar, but by increasing the width of the GridView (doing this so i could test this spectacular scheme :P), that GridView grows outside the Tab, so all of the page has a scroll开发者_Python百科bar...
So here's what i want to do:
- Have a GridView inside a AjaxControlToolkit Tab
- Want that GridView to be able to have a scrollbar, IF that GridView has fields that can't be shown.
(I know that this doubt is a little bit strange, but those are my requirements)
Simply wrap the GridView with a styled Div like the following
<div style="overflow-x:auto;width:800px">
GridView here
</div>
<div style="overflow-x:auto">
@Html.Grid(Model.StudentList).Named("StudentsGrid").Columns(c =>
{
c.Add(x => x.Name).Titled("Name").Filterable(true).Sortable(true);
c.Add(x => x.FName).Titled("Father Name").Filterable(true).Sortable(true);
c.Add(x => x.Class).Titled("Class").Filterable(true).Sortable(true);
c.Add(x => x.RollNo).Titled("Roll No").Filterable(true).Sortable(true);
}).WithPaging(10).EmptyText("No users found..")
</div>
精彩评论