Guest User

Untitled

a guest
Jan 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. <asp:boundfield datafield="ID" headertext="ID" headerstyle-wrap="false" Sortexpression="ID"/>
  2.  
  3. if (e.Row.RowType == DataControlRowType.Header)
  4. {
  5. string ID = ViewState["ID"].ToString();
  6. DataTable dtColumnNames = GetColumns(ID);
  7. string[] strColumns = dtColumnText.Rows.OfType<DataRow>().Select(k => k[1].ToString()).ToArray();
  8. for (int i = 0; i < strColumns.Length; i++)
  9. {
  10. e.Row.Cells[i].Text = strColumns[i];
  11. }
  12. }
Add Comment
Please, Sign In to add comment