This is a migrated thread and some comments may be shown as answers.

RadGrid CustomFilter Issue

3 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahesh Babu
Top achievements
Rank 1
Mahesh Babu asked on 11 Aug 2009, 10:20 AM
Hi,

I have a radGrid to which I want to do custom filtering. I added my custom filters to the radGrid filtermenu. when I click on the custom filter option it is throwing the below exception:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: is neither a DataColumn nor a DataRelation for table MyTable.


Stack Trace:

[ArgumentException:  is neither a DataColumn nor a DataRelation for table MyTable.]
   System.Data.DataRowView.get_Item(String property) +1740730
   lambda_method(ExecutionScope , DataRowView ) +101
   System.Linq.WhereEnumerableIterator`1.MoveNext() +161
   System.Linq.Enumerable.Count(IEnumerable`1 source) +189
   lambda_method(ExecutionScope ) +183
   System.Linq.EnumerableExecutor`1.Execute() +103
   System.Linq.EnumerableExecutor`1.ExecuteBoxed() +23
   System.Linq.EnumerableQuery`1.System.Linq.IQueryProvider.Execute(Expression expression) +83
   Telerik.Web.UI.GridDynamicQueryable.Count(IQueryable source) +278
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData35() +4185
   Telerik.Web.UI.GridDataTableFromEnumerable.FillData() +1010
   Telerik.Web.UI.GridResolveEnumerable.Initialize() +55
   Telerik.Web.UI.GridResolveEnumerable.EnsureInitialized() +40
   Telerik.Web.UI.GridResolveEnumerable.get_DataTable() +31
   Telerik.Web.UI.GridEnumerableFromDataView..ctor(GridTableView owner, DataView dataView, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +222
   Telerik.Web.UI.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +97
   Telerik.Web.UI.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +165
   Telerik.Web.UI.GridTableView.get_ResolvedDataSource() +219
   Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +73
   System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +57
   System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +114
   System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +31
   System.Web.UI.WebControls.DataBoundControl.PerformSelect() +142
   Telerik.Web.UI.GridTableView.PerformSelect() +28
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   Telerik.Web.UI.GridTableView.DataBind() +367
   Telerik.Web.UI.GridTableView.Rebind() +98
   Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source) +1002
   Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +191
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +61
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +165
   Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument) +80
   Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +8934
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



I attached the sample application to this. Please let me know why it is throwing???

file:///D:/Mahesh/Shell/BackupSourceSafe/Shell.CeMI/Shell.CeMI.zip

Thanks,
Mahesh



3 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 11 Aug 2009, 10:56 AM
Hi Mahesh,

I suggest you  take advantage of the filter template, to customize the filter menu and its behavior. Additional information on this option is available in the following article:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Mahesh Babu
Top achievements
Rank 1
answered on 11 Aug 2009, 11:04 AM
My client requirement is to have filter menu. I am not able to attach sample application to this.
could you please let me know how to do it???

Thanks,
Mahesh
0
Pavlina
Telerik team
answered on 12 Aug 2009, 10:12 AM
Hello Mahesh,

To avoid duplicate posts, we can continue our communication on the subject in the support ticket that you have opened on the matter.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Mahesh Babu
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Mahesh Babu
Top achievements
Rank 1
Share this question
or