Date format in datagrid
<table width="100%"
border="0"
align="center"
cellpadding="3"
cellspacing="0">
<tr>
<td>
<div
style="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>
<ItemStyle
HorizontalAlign="center"
VerticalAlign="Middle"
CssClass="border"
/>
<HeaderStyle
Width="17%"
HorizontalAlign="center"
VerticalAlign="Middle"
BackColor="#157AC0"
CssClass="white_text"
/>
asp:TemplateField>
Columns>
asp:GridView>
div>
td>
tr>
table>
No comments :
Post a Comment