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

GridDateTimeColumn filter with null values

2 Answers 193 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex Jimenez
Top achievements
Rank 1
Alex Jimenez asked on 13 Apr 2010, 03:43 PM
Hi,

I have this example : 

                    <telerik:GridDateTimeColumn
                        DataField="fecha_seguimiento"
                        HeaderText="SEGUIMIENTO" SortExpression="fecha_seguimiento"
                        UniqueName="fecha_seguimiento" PickerType="DatePicker"
                        FilterControlWidth="110px" DataFormatString="{0:dd/MM/yyyy}"
                        DataType="System.DateTime" >
                    </telerik:GridDateTimeColumn>

When I  filter for this date colum, it's works perfectly if all records have information, but if a record contains NULL I get the following error:

Línea : 6
Error : Sys.WebForms.PageRequestManagerServerErrorException: La conversión especificada no es válida.

How or where I can specify in the filter that this column may contain null or date and work it.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 14 Apr 2010, 07:42 AM
Hello Alex,

I got filtering to work even when there are NULL values, after I set the EnableLinqExpressions of the grid to false. You can refer the following forum link which discusses on similar scenario.
Filtering IsNull on DateTimeColumn

-Shinu


0
Alex Jimenez
Top achievements
Rank 1
answered on 14 Apr 2010, 08:20 AM
Hi Shinu,

works perfectly

Thanks!!!
Tags
Grid
Asked by
Alex Jimenez
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Alex Jimenez
Top achievements
Rank 1
Share this question
or