This question is locked. New answers and comments are not allowed.
I have a grid structured like this:
and when the grid first shows up (with no data because the Ajax call hasn't completed yet) I can resize the columns while waiting for the data to come through.
However, once the data comes through the column headers are changed and the resize "bars" get lost because the column headers change. The "bars" I'm referring to are the divs with class t-resize-handle.
Is there a way to tell the grid resizing component to reinitialize itself or something once the ajax request finishes?
The only other thing of note is that I am issuing the ajax request myself manually by calling $("#Grid").ajaxRequest();
Oh, one other thing, I had to override the following css style so my headers would wrap the column names as I need them to.
Regards,
Joseph
<%= Html.Telerik().Grid(Model)
.Name("Grid")
.PrefixUrlParameters(false)
.ToolBar(commands =>
{
commands
.Custom()
.HtmlAttributes(new {id = "exportcsv"})
.Text("Export to CSV")
.Action("ExportCsv", "Report");
commands.Custom()
.HtmlAttributes(new { id = "exportexcel" })
.Text("Export to Excel")
.Action("ExportExcel", "Report");
})
.Columns(columns =>
{
columns.Bound(p => p.GroupField1).Title("");
columns.Bound(p => p.Submissions);
columns.Bound(p => p.ReviewRounds);
columns.Bound(p => p.ConceptReviewRounds);
columns.Bound(p => p.PreProductionReviewRounds);
columns.Bound(p => p.FinalReviewRounds);
columns.Bound(p => p.Rework).Format("{0:P}");
})
.EnableCustomBinding(true)
.Resizable(x => x.Columns(true))
.Pageable(paging => paging.Total((int)(ViewData["total"] ?? 0)).PageSize(25).Position(GridPagerPosition.Both))
.Footer(true)
.DataBinding(dataBinding => dataBinding.Ajax().Select("_Render", "Report"))
%>
<% Html.Telerik().ScriptRegistrar(); %>
and when the grid first shows up (with no data because the Ajax call hasn't completed yet) I can resize the columns while waiting for the data to come through.
However, once the data comes through the column headers are changed and the resize "bars" get lost because the column headers change. The "bars" I'm referring to are the divs with class t-resize-handle.
Is there a way to tell the grid resizing component to reinitialize itself or something once the ajax request finishes?
The only other thing of note is that I am issuing the ajax request myself manually by calling $("#Grid").ajaxRequest();
Oh, one other thing, I had to override the following css style so my headers would wrap the column names as I need them to.
.t-grid-header .t-header, .t-grid-header .t-last-header
{
white-space:normal !important;
}
Regards,
Joseph