We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Exception using FilterBar

Thread ID:

Created:

Updated:

Platform:

Replies:

80072 Mar 11,2009 07:58 AM May 7,2009 07:29 AM ASP.NET Web Forms (Classic) 3
loading
Tags: GridGroupingControl
Neil Stevens
Asked On March 11, 2009 07:58 AM

Hi,

I am using the GridGroupingControl to display the results of an object data source, the object data source is a List<> of Project objects.

I have the grid bound and sorting, column resizing and column reordering is working without problem. However, i recently have the requirement to provide filters, i have set the TableDescriptoe.AllowFilter property to True, but i am getting the following error.

Viasys.Core.Diagnostics.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.CreateClientFilterObject(StringBuilder stb, GridTableDescriptor gtd) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.AddGridTablesScript(StringBuilder stb, ChildTable ctable, String tdId, String clientObjectId) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.CreatePropertyInitingStartupScript(StringBuilder stb, String clientObjectId) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.GetClientObjectPropertySettingScript() at Syncfusion.Web.UI.WebControls.CallbackDataBoundControl.Syncfusion.Web.UI.WebControls.ISFCallbackControl.GetClientObjectPropertySettingScript() at Syncfusion.Web.UI.WebControls.CallbackControlEnabler.GetClientObjectPropertySettingScript() at Syncfusion.Web.UI.WebControls.CallbackControlEnabler.GetStartupScript() at Syncfusion.Web.UI.WebControls.CallbackControlEnabler.OnPreRender(EventArgs e) at Syncfusion.Web.UI.WebControls.CallbackDataBoundControl.OnPreRender(EventArgs e) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

This is occurring when the grid is loading and i am not able to get the filter bar to display at all. I read an article about permissions and have given ASPNET, NETWORK SERVER, and Everyone full control over the application folder.

I you require any further information please do not hesitate to ask.

Regards
Neil



Rekha P [Syncfusion]
Replied On March 12, 2009 06:30 AM

Hi Neil,

Thank you for your interest in Syncfusion Products.

The issue reported by you, can be obtained when AllowFilter is enabled in TableDescriptor when ItemTemplate is defined. If the page contains ItemTemplates, then FilterBar should be enabled programmatically from code behind file. Please refer the sample below which illustrates this.

http://files.syncfusion.com/support/GGC.Web/7.1.0.30/F80072/main.htm

The Filtering mechanism work flow is as follows.

When a data source is set for a Grid and while rendering the data in each column will be read and the unique data will be populated to the filter combo box. Hence AllowFilter should be removed from TableDescriptor and should be enabled for the appropriate columns in code behind file. Please refer the code snippet to achieve this.

[ASPX]

AutoFormat="Office 2007 Blue" DataSourceCachingMode="viewState" ShowGroupDropArea="false">


....





[C#]

protected void Page_Load(object sender, EventArgs e)
{
this.GridGroupingControl.TableDescriptor.Columns[0].AllowFilter = true;
this.GridGroupingControl.TableDescriptor.Columns[1].AllowFilter = true;
this.GridGroupingControl.TableDescriptor.Columns[2].AllowFilter = true;
}

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample and send us the modified sample so that we could sort out the cause of the issue and provide you a solution?

Please let me know if you have any other concerns.

Thanks,
Rekha


Brian Burnett
Replied On May 4, 2009 09:05 AM

The AllowFilter property has been made obsolete as of 7.2.0.19 and I'm gettting this error. How do I fix it?


>Hi,

I am using the GridGroupingControl to display the results of an object data source, the object data source is a List<> of Project objects.

I have the grid bound and sorting, column resizing and column reordering is working without problem. However, i recently have the requirement to provide filters, i have set the TableDescriptoe.AllowFilter property to True, but i am getting the following error.

Viasys.Core.Diagnostics.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.CreateClientFilterObject(StringBuilder stb, GridTableDescriptor gtd) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.AddGridTablesScript(StringBuilder stb, ChildTable ctable, String tdId, String clientObjectId) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.CreatePropertyInitingStartupScript(StringBuilder stb, String clientObjectId) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.GetClientObjectPropertySettingScript() at Syncfusion.Web.UI.WebControls.CallbackDataBoundControl.Syncfusion.Web.UI.WebControls.ISFCallbackControl.GetClientObjectPropertySettingScript() at Syncfusion.Web.UI.WebControls.CallbackControlEnabler.GetClientObjectPropertySettingScript() at Syncfusion.Web.UI.WebControls.CallbackControlEnabler.GetStartupScript() at Syncfusion.Web.UI.WebControls.CallbackControlEnabler.OnPreRender(EventArgs e) at Syncfusion.Web.UI.WebControls.CallbackDataBoundControl.OnPreRender(EventArgs e) at Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

This is occurring when the grid is loading and i am not able to get the filter bar to display at all. I read an article about permissions and have given ASPNET, NETWORK SERVER, and Everyone full control over the application folder.

I you require any further information please do not hesitate to ask.

Regards
Neil





Rekha P [Syncfusion]
Replied On May 7, 2009 07:29 AM

Hi Neil,

The AllowFilter property is deprecated since this property produces issues internally. We would suggest you to work with this property with the warning, and we will let you know once the issue is fixed and the property becomes live.

You can run the sample successfully with this warning and please refer the sample below in version 7.2.0.19 using AllowFilter property enabled at code behind when ItemTemplate is used.

http://files.syncfusion.com/support/GGC.Web/7.2.0.19/F80072/main.htm

Please let me know if you have any concerns.

Thanks,
Rekha

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;