Date format in datagrid
<table width="100%"border="0"align="center"cellpadding="3"cellspacing="0">
<tr>
<td>
<divstyle="overflow: auto; height: 400px;">
<asp:GridView ID="grdViewGroup"AllowPaging="true"runat="server"AutoGenerateColumns="false"
PageSize="10"OnPageIndexChanging="grdViewGroup_PageIndexChanging"OnRowCommand="grdViewGroup_RowCommand"
OnRowDeleting="grdViewGroup_RowDeleting"OnRowEditing="grdViewGroup_RowEditing">
<Columns>
<asp:TemplateField HeaderText="Date Created">
<ItemTemplate>
<asp:Label ID="lblDate"runat="server"Text='<%#Eval("DateCreated","{0: dd/MM/yyyy}") %>'>asp:Label>
ItemTemplate>
<ItemStyleHorizontalAlign="center"VerticalAlign="Middle"CssClass="border"/>
<HeaderStyleWidth="17%"HorizontalAlign="center"VerticalAlign="Middle"BackColor="#157AC0"
CssClass="white_text"/>
asp:TemplateField>
Columns>
asp:GridView>
div>
td>
tr>
table>
0 comments:
Post a Comment