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

Date time format issue

0 Answers 92 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David Bailey
Top achievements
Rank 1
David Bailey asked on 11 Feb 2011, 06:09 PM

I have tried to make the dates in the grid show without time using the {0:MM/dd/yyyy} format and the .Format method but the time shows in the grid(which is not what I want).  I am running win 2k8 r2 as a server and my client browser is IE8.

David Bailey

string formatDate = HttpContext.MyClient().AppSettings.Compliance.GridDateFormat;
           builder = builder.Name("AccountSectionGrid").Columns
           (
               columns =>
               {
                   columns.Add(i => i.NavigationLink).Encoded(true).Filterable(false).Width(45).Title("");
                   if (isAdmin)
                       columns.Add(i => i.UserName).Title("User Name");
                   columns.Add(i => i.Name).Title("Name");
                   columns.Add(i => i.CreateDate).Title("Create Date").Format(formatDate);
               }
           )
           .Ajax(ajax => ajax.Action("Account_AjaxBinding", "ComplianceSections"))
           .PrefixUrlParameters(false)
           .EnableCustomBinding(true)
           .Filterable(filtering => filtering.Enabled(isAdmin))
           .Sortable(sorting => sorting.Enabled(isAdmin))
           .Pageable(paging => paging.Enabled(isAdmin).PageSize(HttpContext.MyClient().AppSettings.Compliance.ItemsPerGrid))
           .Scrollable(scrolling => scrolling.Enabled(true).Height(SCROLLHEIGHT));
Tags
Grid
Asked by
David Bailey
Top achievements
Rank 1
Share this question
or