Good day,
I have a webdatagrid on my page and have a datasource for it as object list. The code is like this:
private List<AccommodationPrio> GetPrioritiesSelectionData() { GoGoYield_Entities entities = Master.GetEntities(); int? intBrandId = (int?)GetSelectedBrandId(); List<AccommodationPrio> result = (List<AccommodationPrio>)Session["AccommodationPrios"]; if (result == null) { System.Linq.IOrderedQueryable<AccommodationPrio> query = Master.GetEntities().AccommodationPrios.OrderBy(p => p.Priority.Value); //.Include("Accommodation") result = query.ToList(); Session["AccommodationPrios"] = result; } return result; }
and the aspx:
<ig:WebDataGrid ID="wdgPriorities" runat="server" AutoCRUD="true" AutoGenerateColumns="False" DataKeyFields="BrandId,AccommodationId" CssClass="margin1pct" Width="98%" OnLoad="wdgPriorities_onLoad" Height="650px" oninitializerow="wdgPriorities_InitializeRow"> <Behaviors> <ig:Filtering AnimationEnabled="True"> </ig:Filtering> <ig:ColumnResizing Enabled="true"> <ColumnSettings> <ig:ColumnResizeSetting EnableResize="true" /> </ColumnSettings> </ig:ColumnResizing> <ig:EditingCore> <Behaviors> <ig:CellEditing> <EditModeActions EnableOnActive="True" EnableOnKeyPress="True" MouseClick="Single" /> <ColumnSettings> <ig:EditingColumnSetting ColumnKey="Priority" ReadOnly="true" /> </ColumnSettings> </ig:CellEditing> </Behaviors> </ig:EditingCore> </Behaviors> </ig:WebDataGrid>
When applying a filter on one of the colums the first time it works fine. The second time i apply the same (or other) filter on a column it results in the following error:
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Web.UI.GridControls.JsTypeResolver.ResolveTypeId(Type type) +887 Infragistics.Web.UI.GridControls.ColumnFilter.set_ColumnKey(String value) +576 Infragistics.Web.UI.GridControls.ColumnFilter.LoadViewState(Object savedState) +189 Infragistics.Web.UI.Framework.ObjectBase.System.Web.UI.IStateManager.LoadViewState(Object state) +39 Infragistics.Web.UI.Framework.ObjectCollection.LoadViewStateItems(ArrayList itemList) +331 Infragistics.Web.UI.Framework.ObjectCollection.LoadViewState(Object savedState) +219 Infragistics.Web.UI.Framework.ObjectCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState) +39 Infragistics.Web.UI.GridControls.Filtering.LoadViewState(Object savedState) +171 Infragistics.Web.UI.Framework.ObjectBase.System.Web.UI.IStateManager.LoadViewState(Object state) +39 Infragistics.Web.UI.Framework.ObjectCollection.LoadViewStateItems(ArrayList itemList) +331 Infragistics.Web.UI.Framework.ObjectCollection.LoadViewState(Object savedState) +219 Infragistics.Web.UI.Framework.ObjectCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState) +39 Infragistics.Web.UI.GridControls.WebDataGrid.LoadViewState(Object savedState) +645 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +187 System.Web.UI.Control.LoadChildViewStateByID(ArrayList childState) +130 System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +239 System.Web.UI.Control.AddedControl(Control control, Int32 index) +8901358 System.Web.UI.ControlCollection.Add(Control child) +79 Infragistics.Web.UI.LayoutControls.AJAXContentPane.InstantiateTemplate(Boolean ajax, Boolean dynamicUP, String triggerID, Boolean loadContent) +1572 Infragistics.Web.UI.LayoutControls.WebTab.InstantiateTemplates() +1181 Infragistics.Web.UI.LayoutControls.WebTab.CreateChildControls() +56 System.Web.UI.Control.EnsureChildControls() +102 System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +20 System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +365 System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +365 System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +365 System.Web.UI.Page.FindControl(String id) +38 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +287 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +878
I have NetAdvantage 2010.2.
Do you have any ideas?
regards,
René
I am having this same issue. I have a master / details setup, where the user selects a row in the master grid and hits a "Show Details" button. That triggers a binding on the server of the details grid to a list of objects that I compute in code. I am doing this on several other pages with no issues. However on this page, when I bind the details grid to an empty list of objects, I get the following error:
System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Web.UI.GridControls.JsTypeResolver.ResolveTypeId(Type type) at Infragistics.Web.UI.GridControls.GridField.SaveClientProperties() at Infragistics.Web.UI.GridControls.FormattedGridField.SaveClientProperties() at Infragistics.Web.UI.GridControls.BoundDataField.SaveClientProperties() at Infragistics.Web.UI.Framework.ObjectBase.Infragistics.Web.UI.IClientState.SaveClientProperties() at Infragistics.Web.UI.Framework.ObjectBase.WriteClientCollections(StringBuilder builder, ArrayList collections) at Infragistics.Web.UI.Framework.ObjectBase.SaveCollectionsStateToViewState() at Infragistics.Web.UI.Framework.RunBot.HandleSaveViewState() at Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.SaveViewState() at Infragistics.Web.UI.GridControls.BaseGrid.SaveViewState() at Infragistics.Web.UI.GridControls.WebDataGrid.SaveViewState() at System.Web.UI.Control.SaveViewStateRecursive(ViewStateMode inheritedMode)
Can anyone provide additional information as to why this would be happening?
I am already calling ClearDataSource() before rebinding, and also have EnableDateViewState="True". I've tried turning behaviors on and off and am not seeing any difference.
This issue has remained untouched for the last few months. Does anyone have an update on it or any idea of why it happens? Infragistics, if you see this update, please respond. I am now weeks away from deployment and I still have this issue.
I just deployed the latest service release and it did not resolve my issue.
Thanks
Ok, no need for anyone else to research further. I had a dozen columns specified in my Columns collection. For one of them the DataType was System.Strig instead of System.String.
does anyone has any update on this thread we are also suffering from infragisitics diesases now.
Trying InitialDataBindDepth="" InitialExpandDepth="" to the no of bands, solved my problem.
For My case it was unable to work on child items as 2nd time binding didn't bind the whole heirarchy.