Hi.
I'm using MS 2010 (.Net 3.5) with latest service release of "NetAdvantage for Web Client 2010 Vol. 2"
I have WebDataGrid with two TemplateDataColumns in it.
When I perform filtering on any column (doesn't matter if this column of BoundData type or of Template one) application crashes with following error:
[NullReferenceException: Object reference not set to an instance of an object.] Infragistics.Web.UI.GridControls.WebDataGrid.InstantiateTemplates() +594 Infragistics.Web.UI.GridControls.BaseGrid.EnsureTemplates() +10 Infragistics.Web.UI.GridControls.WebDataGrid.CreateChildControls() +41 System.Web.UI.Control.EnsureChildControls() +87 Infragistics.Web.UI.GridControls.WebDataGrid.EnsureChildControls() +71 Infragistics.Web.UI.GridControls.WebDataGrid.DataBind() +464 Infragistics.Web.UI.GridControls.Filtering.ApplyFilter() +188 Infragistics.Web.UI.GridControls.Filtering.OnAction(String actionType, Object id, Object value, Object tag) +51 Infragistics.Web.UI.GridControls.GridBehavior.Infragistics.Web.UI.GridControls.IGridBehavior.OnAction(String actionType, Object id, Object value, Object tag) +19 Infragistics.Web.UI.GridControls.GridBot.LoadAdditionalClientState(Object state) +441 Infragistics.Web.UI.Framework.RunBot.HandleRaisePostDataChangedEvent() +99 Infragistics.Web.UI.GridControls.GridBot.HandleRaisePostDataChangedEvent() +42 Infragistics.Web.UI.Framework.Data.FlatDataBoundControl.RaisePostDataChangedEvent() +15 System.Web.UI.Page.RaiseChangedEvents() +165 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1485
Is there any workaround for this issue?
Also here is markup for webdatagrid control:
<ig:WebDataGrid ID="wdgPortals" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyFields="PortalId" DataSourceID="dsPortalView" EnableAjax="False" OnRowSelectionChanged="wdgPortals_RowSelectionChanged"> <Columns> <ig:BoundDataField DataFieldName="CompanyName" Key="CompanyName"> <Header Text="Company" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Name" Key="Name"> <Header Text="Name" /> </ig:BoundDataField> <ig:TemplateDataField Key="IsEnabled"> <ItemTemplate> <asp:CheckBox CssClass="autow" ID="chbEnabled" runat="server" Checked='<%# ((((Portal.BusinessLogic.Model.VwPortal)((Infragistics.Web.UI.TemplateContainer)Container).DataItem).IsEnabled == 1) ? true : false) %>' Enabled="False" /> </ItemTemplate> <Header Text="Enabled" /> </ig:TemplateDataField> <ig:TemplateDataField Key="UsersCount"> <ItemTemplate> <%# ((Portal.BusinessLogic.Model.VwPortal)((Infragistics.Web.UI.TemplateContainer)Container).DataItem).UsersCount %> </ItemTemplate> <Header Text="# users" /> </ig:TemplateDataField> </Columns> <Behaviors> <ig:Paging PageSize="10"> </ig:Paging> <ig:RowSelectors> </ig:RowSelectors> <ig:Selection CellClickAction="Row" CellSelectType="None" RowSelectType="Single"> <AutoPostBackFlags RowSelectionChanged="True" /> </ig:Selection> <ig:Sorting> <ColumnSettings> <ig:SortingColumnSetting ColumnKey="CompanyName" /> <ig:SortingColumnSetting ColumnKey="Name" /> <ig:SortingColumnSetting ColumnKey="IsEnabled" Sortable="False" /> </ColumnSettings> </ig:Sorting> <ig:Filtering AnimationEnabled="true" AnimationType="Bounce" Enabled="true" ></ig:Filtering> </Behaviors> </ig:WebDataGrid>* This source code was highlighted with Source Code Highlighter .