Filtering Telerik MVC Grid on Date only (neglect time values) -


I have a column in the Teleormic MVC grid which is the date of the date I type for display and filtering only its date I want to use part of . State & gt; () .name ("tlkStateGrid") .Columns (col = & gt; {col as a result, I use the following code

  @ (Html.Telerik) Grid Bound (M = & gt; m.CreatedOn). Title ("Date Created") Format ("{0: DD / MM / Year}");.   

Grid Displays date (created) in the specified format, however, filtering does not work as expected. I think that the time value of the filtering is also considered by grid, so if two dates are one , But when there are different time values, they are not considered 'equal', how do I ignore grid configurable time values ​​and only compare dates, when filtration

Note: I have posted similar questions in the Telerik MVC forums, but so far no reply

You only have a date To clarify the property made to be made clearly Lambda expression Can be modified. Date Date Component of time object.

  col.Bound (m = & gt; M.CreatedOn.Date)   

You are now down as the new code.

  @ (Html.Telerik). Grid & lt; State & gt; () .name ("tlkStateGrid"). Column (col = & gt; {Col.Bound (m = & gt; m.CreatedOn.Date). Title ("Created on"). Format ({0: dd / MM / yyyy} ");   

If you have a tap time on the time created, you will need to use your value property before you get a date component. See below.

  col Bound (m = & gt; m.CreatedOn.HasValue? M.CreatedOn.value.Det: M.CreativeOn)    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -