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).
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:
The exeption "
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
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