The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
When I try to filter on an unbound column I get the following exception from the grid:
"Object must be of type Decimal"
Any idea of what may be the problem here?
Further information:
I provide the values for the unbound column in the QueryValue handler. The values are either DBNull.Value or a decimal number. (I also tried to avoid DBNull.Value, but still gets the same error.)
When I define the unbound column I do it about like so:
FieldDescriptor fieldDescriptor = new FieldDescriptor(columnName, "", false, "");
gridGroupingControl1.TableDescriptor.UnboundFields.Add(fieldDescriptor);
gridGroupingControl1.TableDescriptor.Columns.IsModified = true;
GridColumnDescriptor gridColumnDescriptor = new GridColumnDescriptor(fieldDescriptor);
gridGroupingControl1.TableDescriptor.Columns.Add(gridColumnDescriptor);
I have noticed that this never define the data type of the column, but am not sure if this should be done, and if so, where.
ADAdministrator Syncfusion Team September 2, 2005 02:12 PM UTC
This is a defect that will will have to address in our code. Unbound columns are not currently recognized in expressions, and they need a value type associated with them to be filtered using descriptors. Here are two open issue links, one for the defect on not being able to use unbound columns in expression, and the other for a feature request of supporting ValueType for unbound columns.
http://www.syncfusion.com/support/issues/grouping/Default.aspx?ToDo=view&questId=713
http://www.syncfusion.com/support/features/grid/Default.aspx?ToDo=view&questId=413
As a work around until there is a release with this corrected, you can try using the QueryRecordMeetsFilterCriteria and directly applying the filter there. Here is a little sample.
http://www.syncfusion.com/Support/user/uploads/GGC_unboundCol_14bde090.zip