changing the datatype of the kendo grid column from string to date

1 Answer 99 Views
Filter Grid
Rakesh
Top achievements
Rank 1
Rakesh asked on 27 Dec 2021, 12:45 PM | edited on 27 Dec 2021, 12:47 PM

The kendo Grid Column datatype is string

columns.Bound(c => c.StartDate).Title("Start date").Format("{0: dd/MM/yyyy}").Filterable(f => f.Cell(c =>c.ShowOperators(false).Operator("contains").SuggestionOperator(FilterType.Contains)));

I am able to change the datatype of the Kendo Grid column from string to Date.

.DataSource(dataSource => dataSource

.Ajax()

.Model(model =>

    {

        model.Id(p => p.ID);

       model.Field("StartDate", typeof(DateTime));

 })

 

but the issue i am facing is, if the value of the string like "23/03/2020" or "15/06/2021", then no value will be displayed in the cell of the "StartDate" column of the Grid.

please help me to resolve the issue.

 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 30 Dec 2021, 08:47 AM

Hi ,

 

Thank you for writing to us.

I am afraid this requirement is not supported. You will need to use custom filter operator to achieve this requirement:
https://www.telerik.com/forums/date-filter-doesn-t-ignore-the-time

Feel free to give this suggestion a try and let me know how it goes.

 

Regards,
Eyup
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Filter Grid
Asked by
Rakesh
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or