Hello,
The grid pager doesn't show correctly sometimes. For explane, if you have a tab control with 2 tabs and a grid in each tab, the second grid pager is not rendered correcty (the links to page number doesn't appear). It happens too when the grid is on a Partial View and is rendered intp a bootstrap modal.
Thanks!!!
Hello,
You can reproduce in the sample if you configure the grids as Responsive: .IsResponsive(true).
<div class="row">
<div style="width: 550px">
@{Html.EJ().Tab("dish")
.ClientSideEvents(e => { e.ItemActive("itemActive").Create("create"); })
.Items(data =>
{
data.Add().ID("grid1").Text("Grid 1")
.ContentTemplate(@<div>
@(Html.EJ().Grid<Object>("Grid1")
.Datasource((IEnumerable<Object>)ViewBag.datasource1).AllowPaging()
.PageSettings(page => page.PageSize(4).PageCount(3))
.Columns(col =>
{
col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true)
.TextAlign(TextAlign.Right).Width(75).Add();
col.Field("CustomerID").HeaderText("Customer ID").Width(80).Add();
}))
</div>
);
}).ShowCloseButton(true).Render();}
</div>
</div>
<script>
function create(args) { //tab's create event
var tabObj = $(".e-tab").data("ejTab"); // tab instance
tabObj.addItem("#new", "Grid", 1, "myClass", "Grid2"); //adding new tab at index 1
}
function itemActive(args) { //tab's itemactive event
if (args.activeIndex == 1) { // if tab of index 1 is active
$("#Grid2").ejGrid({ // rendering grid inside tab of index 1
dataSource: data1,
allowPaging: true,
isResponsive: true,
pageSettings: { pageSize: 2 },
-----------
});
}
}
</script>
|
Hello,
I cannot use that solution becouse I need to create and cofigure the grid in the View Code (Razor).
Is there a solution only with Razor code?
Thanks!