Tag Archives: Gridview

Change default date time format in gridview

Use this DataFormatString=”{0:d}” If in gridview you are getting date format something like 11 march 2016 12:00:00(or default format) Example:- <asp:BoundField DataField=”SNAPSHOT_DATA_DATE” HeaderText=”Snapshot Date” ApplyFormatInEditMode=”true” SortExpression=”SNAPSHOT_DATA_DATE” DataFormatString=”{0:d}” />

Gridview using jQuery in Asp.Net

1st add the reference of JQuery library in your asp.net web page inside <Head> tag like this <script src=”Script/jquery-1.4.min.js” type=”text/javascript”></script> BIND GRIDVIEW TO DATASOURCE Now lets Drag and drop GridView in your asp.net web form and it will be like this <asp:GridView ID=”GridView1″ runat=”server”></asp:GridView> But its up to you you can set the autogeneratecolumn property… Read More »