Format DateTime in Kendo UI Grid using ASP.Net MVC Wrapper

Format DateTime in Kendo UI Grid using ASP.Net MVC Wrapper

Hello everyone, I am going to share the code sample for custom DateTime format in Kendo UI Grid template using ASP.Net MVC

The code detail as given below.

@(Html.Kendo().Grid<Model.Users>()
    .Name("GridName")
    .Columns(columns =>
    {
        columns.Bound(p => p.ID).Title("ID");
        columns.Bound(p => p.CREATE_DATE).Title("DATE")
.ClientTemplate("#= kendo.toString(kendo.parseDate(CREATE_DATE), 'dd/MM/yyyy') #");
    })
    .DataSource(ds => ds
        .Ajax()
        .Read(read => read.Action("ActionName", "ControllerName"))
        .PageSize(PageSize)
    )
    .Pageable()
    .Sortable(s => s.SortMode(GridSortMode.MultipleColumn))
    .Resizable(e => e.Columns(true))
    .Filterable(f => f.Extra(false)
        .Operators(o => o.ForString(str => str.Clear()
                .StartsWith("Starts with")
                .EndsWith("Ends with")
                .Contains("Contains")
                .DoesNotContain("Not contains")
            )
        )
    )
)

Thank you!



ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book