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

Filtering on Guid columns

3 Answers 171 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Michael Hilgers
Top achievements
Rank 1
Michael Hilgers asked on 27 Sep 2011, 01:35 PM
Hi Everyone!

I started using the RadGridView. The grid is populated by a DataTable containing string, boolean and guid values for the different rows.

I mapped the guid columns to GridViewComboBoxColumns whose DataSources are DataTables containing the Description for the Guids (see code).

DataTable data = DbTools.GetExistingFawisGroups();
DataTable clGroups = DbTools.GetBBlockGroups();
DataTable clCategories = DbTools.GetBBlockCategories();
 
GridViewComboBoxColumn colGroup = new GridViewComboBoxColumn();
colGroup.Name = "columnGroupId";
colGroup.HeaderText = "Gruppe";
colGroup.FieldName = "bBlockGroupId";
colGroup.ValueMember = "id";
colGroup.DisplayMember = "descript";
colGroup.DataSource = clGroups;
this.radGridView.Columns.Add(colGroup);
 
GridViewComboBoxColumn colCat = new GridViewComboBoxColumn();
colCat.Name = "columnCategoryId";
colCat.HeaderText = "Kategorie";
colCat.FieldName = "bBlockCategoryId";
colCat.ValueMember = "id";
colCat.DisplayMember = "descript";
colCat.DataSource = clCategories ;
this.radGridView.Columns.Add(colCat);
 
this.radGridView.DataSource = this.data;
this.data.AcceptChanges();

Now filtering (GridView standard filters) for all columns except the mapped guid columns is working fine. When i click on the filter icon in the column headers of the guid columns, i see the descriptions representing the guids and can select them. But by clicking ok i get the following exeption:

Telerik.Data.Expressions.ParserException: Missing operator before a operand.
   bei Telerik.Data.Expressions.ExpressionParser.TryParse(Boolean enableExceptions, ExpressionNode& expressionNode)
   bei Telerik.Data.Expressions.ExpressionParser.Parse(String expression, Boolean caseSensitiveLike)
   bei Telerik.WinControls.Data.RadCollectionView`1.set_FilterExpression(String value)
   bei Telerik.WinControls.UI.GridViewFilterDescriptorCollection.ApplyFilter()
   bei Telerik.WinControls.UI.GridViewFilterDescriptorCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   bei Telerik.Collections.Generic.NotifyCollection`1.InsertItem(Int32 index, T item)
   bei Telerik.WinControls.UI.GridViewFilterDescriptorCollection.InsertItem(Int32 index, FilterDescriptor item)
   bei System.Collections.ObjectModel.Collection`1.Add(T item)
   bei Telerik.WinControls.UI.GridViewDataColumn.SetFilterDescriptor(FilterDescriptor value)
   bei Telerik.WinControls.UI.RadListFilterMenuProvider.SetFilterDesriptor(GridViewDataColumn dataColumn, FilterDescriptor descriptor)
   bei Telerik.WinControls.UI.RadListFilterMenuProvider.SetFilterDescriptor(FilterDescriptor descriptor)
   bei Telerik.WinControls.UI.RadListFilterMenuProvider.ButtonOK_Click(Object sender, EventArgs e)
   bei System.EventHandler.Invoke(Object sender, EventArgs e)
   bei Telerik.WinControls.RadItem.OnClick(EventArgs e)
   bei Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
   bei Telerik.WinControls.RadItem.DoClick(EventArgs e)
   bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
   bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
   bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
   bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
   bei Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)
   bei Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
   bei Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei Telerik.WinControls.RadControl.WndProc(Message& m)
   bei Telerik.WinControls.UI.RadPopupControlBase.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.RunDialog(Form form)
   bei System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   bei System.Windows.Forms.Form.ShowDialog()
   bei SuS.Tobs.Forms.Mainframe.buttonItemFawisGroupEdit_Click(Object sender, EventArgs e) in D:\Entwicklung\C#\Projects\tobs\Project\SuS.Tobs\Sources\Forms\Mainframe.cs:Zeile 580.
   bei DevComponents.DotNetBar.BaseItem.RaiseClick(eEventSource source)
   bei DevComponents.DotNetBar.BaseItem.InternalMouseUp(MouseEventArgs objArg)
   bei DevComponents.DotNetBar.PopupItem.InternalMouseUp(MouseEventArgs objArg)
   bei DevComponents.DotNetBar.ButtonItem.InternalMouseUp(MouseEventArgs objArg)
   bei DevComponents.DotNetBar.BaseItem.InternalMouseUp(MouseEventArgs objArg)
   bei DevComponents.DotNetBar.ItemContainer.InternalMouseUp(MouseEventArgs objArg)
   bei DevComponents.DotNetBar.ItemControl.OnMouseUp(MouseEventArgs e)
   bei DevComponents.DotNetBar.RibbonBar.OnMouseUp(MouseEventArgs e)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.WndProc(Message& m)
   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   bei System.Windows.Forms.ContainerControl.WndProc(Message& m)
   bei DevComponents.DotNetBar.ItemControl.WndProc(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   bei System.Windows.Forms.Application.Run(Form mainForm)
   bei SuS.Tobs.Application.Program.StartApplication(SplashScreenForm form) in D:\Entwicklung\C#\Projects\tobs\Project\SuS.Tobs.Application\Sources\Common\Program.cs:Zeile 142.

The exeption "Missing operator before a operand" always contains a part of the guid, in this case it's just the "a", but it's always different an definitly a part of the guid.

What can i do to make filtering work for all my columns in the grid view? The posting (http://www.telerik.com/community/forums/winforms/gridview/cannot-use-a-guid-as-a-valuemember-with-filtering-on-radgridview.aspx) seems to point to the same problem, but doesn't solve my problem because by appling the described solution none of my filterings are working any more.

Kind Regards,
Michael

3 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 30 Sep 2011, 02:00 PM
Hello Michael,

Thank you for writing.

We still do not support filtering on GUID type of values and using CustomFiltering is not sufficient to overcome this limitation. We will consider including this feature in one of the next releases.

I have updated your Telerik points for bringing this to our attention. You can track the status of the feature request in our PITS system.  

Let me know if you have any other questions.

Kind regards,
Martin Vasilev
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Michael Hilgers
Top achievements
Rank 1
answered on 03 Feb 2012, 10:23 AM
Hello Telerik-Team,

is there any progress about my feature request? I really need this feature now :)

Regards,
Michael
0
Julian Benkov
Telerik team
answered on 08 Feb 2012, 12:25 PM
Hello Michael,

We are currently working on it and support for Guid type in the filtering operation will be included in one of the releases after the currently upcoming Q1 2012, planned for the next week.

Thank you for your time and cooperation.

Regards,
Julian Benkov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
GridView
Asked by
Michael Hilgers
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Michael Hilgers
Top achievements
Rank 1
Julian Benkov
Telerik team
Share this question
or