GridFilterBar (null values?)

Hi, I have a GridDataBoundGrid which I use to bind a DataTable to, this works just fine. This DataTable can contain NULL values. When I try to wire a GridFilterBar to this GridDataBoundGrid I get exceptions when it tries to add a column filter header to a *numeric* datatype (ie. double) which contains NULL values. Empty strings are no problem as NULL values usually get converted to empty strings automatically. How should I best go about to solve this sothat my null values AND my datatypes are preserved? Example (DataTable): Column1 (String); Column2 (String); Column3 (Double); "Value1"; "Value2"; 12.0; "Value3"; , ; "Value4"; "Value5", 3.0; -> Binding this data to a GridDataBoundGrid and afterwards adding a GridFilterBar causes an exception when attempting to add a row header filter for Column3. Thanks!

1 Reply

AD Administrator Syncfusion Team December 26, 2005 05:12 AM UTC

Hi Roel Charita, Here is a sample that has null values in the numeric datatype and no issues are seen. If you have problem, in running the sample, please mention the version you are using. Here is the code snippet dt.Rows.Add(new object[] {"Value3","",null}); Best Regards, Madhan

GridFilterBar_39013.zip

Loader.
Up arrow icon