How To Convert DateTime To Date(MM/dd/yyyy) Formate
<asp:GridView ID="GridView1" runat="server"
AllowSorting="True" RowHeaderColumn="Operation"
ShowFooter="false" ShowHeaderWhenEmpty="True"
Width="100%" AutoGenerateColumns="False"
EnablePersistedSelection="False" ForeColor="Black"
Height="16px" BorderWidth="1px" onrowdatabound="GridView1_RowDataBound"
onrowcommand="GridView1_RowCommand" >
<Columns>
<asp:TemplateField HeaderText="S.No." ><ItemStyle Width="100px" />
<ItemTemplate>
<%# ((GridViewRow)Container).RowIndex + 1%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label3" runat="server" Text="Customer Name"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<%#Eval("Customer_Name")%>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="File No"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<%#Eval("File_No") %>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="Collection"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text=""></asp:Label>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="Opening Date"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="Label9" runat="server" Text='<%#String.Format("{0:d}",Eval("FDate_Of_Opening"))%>'></asp:Label>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="Short/Excess"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<%#Eval("short_excess")%>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="EDI"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<%#Eval("FEDI")%>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="last Received Date"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<%#String.Format("{0:d}",Eval("last_pay_date"))%>
</ItemTemplate><HeaderStyle></HeaderStyle>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>
<asp:Label ID="Label2" runat="server" Text="Remarks"></asp:Label>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="loanmode" Visible="false" runat="server" Text='<%#Eval("FLoan_Mode") %>'></asp:Label>
</ItemTemplate>
<HeaderStyle></HeaderStyle>
</asp:TemplateField>
</Columns>
<HeaderStyle HorizontalAlign="Left" BackColor="#CCFFFF" BorderColor="Black"
BorderStyle="None" Font-Size="Large" Height="30px" />
<RowStyle ForeColor="Black" Height="30px" />
</asp:GridView>
No comments:
Post a Comment