I am creating a handful of Grids in MVC. I notice that Document.Ready is called pretty quickly but the ig.loader takes quite a while.
In FireFox this is an issue because it is taking longer than 10 seconds for the grids to render.
The Razor code executes quickly. Other than changing the design of the page to create everything in javascript, instead of creating the grids in MVC, is there anyway to control when the infragistics code takes a breather to avoid the script running to long message?
On a side note when I hook into the iggriddatabound I can see that the dataView contains the correct data however grid.rows() is always 0 until some time later, what event is safe to hook into in order to know that the grid is fully operational
Version 12.2.20122.2113
@(Html.Infragistics().Loader() .ScriptPath(Url.Content("~/Scripts/Infragistics/")) .CssPath(Url.Content("~/Content/Infragistics/")) .Resources("igCombo,igGrid.Filtering") .Theme("infragistics") .Render())
The call back only partially solved the problem because it is called during the time I create them with the Razor/MVC code.
I am basically trying to create all of the grids on the page without loading any data, just setting the columns/model up and then have the events to bind to the data fire
The problem I have is that I need to create about 20 - 30 grids on a page and it is taking a considerable amount of time. I am currently doing this through a loop with Razor code and I am debating moving it to Javascript.
I am doing something like the following
@foreach (var physician in physicians) {
var linkId = openCloseLink + physician.UserObjectID;
var gridId = gridPatients + physician.UserObjectID;
<div class="gridPatientInfo">
@(@Html.Infragistics().Grid<PatientGridMember>()
.ID(gridId).PrimaryKey("PatientListMembersID")
.LoadOnDemand(false).AutoGenerateColumns(false).AutoGenerateLayouts(false).EnableUTCDates(true)
.EnableHoverStyles(true).RenderCheckboxes(true).LocalSchemaTransform(true).AutoCommit(true)
.Columns(GenerateChildColumns)
.Features(feature => {
feature.Sorting().Mode(SortingMode.Single);
feature.Selection().Mode(SelectionMode.Row).MultipleSelection(true);
feature.RowSelectors().EnableCheckBoxes(true).EnableRowNumbering(false);
feature.Resizing().AllowDoubleClickToResize(true);
feature.Updating().EditMode(GridEditMode.Cell).
EnableDeleteRow(false).EnableAddRow(false).ColumnSettings(CreateColumnSettings);
})
.DataSource(Model)
.DataSourceUrl(Url.Action("GetGridData", "PatientMapping2", new {
patientListID = ViewData["PatientListID"],
patientListUserObjectsID = physician.UserObjectID
}))
.DataBind()
.CalculateWidthAndHeight()
.Render()
)
</div>
}
Hello ddally,
Thank you for contacting Infragistics!
I have a few questions concerning this matter. What version of NetAdvantage are you using? What scripts are you loading in with the loader? How are you using the loader? Did the call back into the controller solve the problem for you?
Sincerely,Mike P.Developer Support Engineer IIInfragistics, Inc.www.infragistics.com
I have been able to call back into the controller, I believe that will solve the problem
At this point it looks like the databind call,
I am wondering if converting it to call back into my controller via a GridDataSourceAction, or a WebService would help.
Do you have any suggestions, or samples to point me to?