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

GridDateTimeColumn Filter error

1 Answer 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 23 Nov 2011, 05:56 PM
Hello,

i am getting the following error when trying to filter a GridDateTimeColumn:

Neither of the types 'String' and 'Nullable`1' converts to the other

this is the markup i have:

<telerik:RadGrid ID="ProcessesRadGrid" runat="server" Width="97%"  OnItemCommand="ProcessesRadGridItemCommand"
AllowPaging="true" PageSize="10" OnPageIndexChanged="ProcessesRadGrid_PageIndexChanged" OnNeedDataSource="ProcessesRadGrid_NeedDataSource" OnSortCommand="ProcessesRadGrid_SortCommand" AllowSorting="True">
        <MasterTableView AutoGenerateColumns="false" DataKeyNames="AcProcesses.Acprocessid" ClientDataKeyNames="AcProcesses.Acprocessid"
            Width="100%" CommandItemDisplay="Top" AllowFilteringByColumn="true">
                <CommandItemSettings ShowAddNewRecordButton="false" />
                <Columns>
                    <telerik:GridBoundColumn HeaderText="Organization" DataField="AcProcesses.Organization.Organizationname"></telerik:GridBoundColumn>
                    <telerik:GridDateTimeColumn  HeaderText="Start Date" DataField="AcProcesses.StartDate" SortExpression="AcProcesses.StartDate" DataType="System.DateTime" PickerType="DatePicker" DataFormatString="{0:dd/MM/yyyy}"  FilterControlWidth="100px">
                    </telerik:GridDateTimeColumn>
                    ........

Not sure what I'm missing... the weird thing is that i have another grid on the same page with filtering working on dates... i also noticed that on that second grid the filter button has less options (ex: it doesn't have 'contains')

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Nov 2011, 05:09 AM
Hello,

I have tried to reproduce the issue but no avail. You can take a look into the following demo.
Grid / Basic Filtering

Thanks,
Princy.
Tags
Grid
Asked by
Tony
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or