two questions about grindView and dataTable.
- how can i set a dataTable index which always counts one up?
e.g. i make a column:
Columns.Add(new DataColumn("#"));
and when i add a row, the # column is automatically increased? - how can i rotate the background color in a g开发者_如何学运维ridView?
Set Rowstyle for gridview backcolour e.g.
<asp:GridView id="gd" runat="Server">
<RowStyle BackColor="Red" />
</asp:GridView>
If u want it from Code side then
For particular Column
gridview.Columns[0].ItemStyle.BackColor = System.Drawing.Color.Red;
For grid
gridview.BackColor = System.Drawing.Color.Red;
精彩评论