if (e.Row.RowType == DataControlRowType.DataRow) { DataRow row = ((DataRowView)e.Row.DataItem).Row; for (int i = 0; i < row.ItemArray.Length; i++) { var obj = row.ItemArray[i]; if (obj.GetType().Name == "DateTime") { e.Row.Cells[i + 1].Text = ((DateTime)obj).ToShortDateString(); } else if (obj.GetType().Name == "Boolean") { e.Row.Cells[i + 1].Text = ((Boolean)obj).ToYesNo(); } } }
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Showing posts with label gridview. Show all posts
Showing posts with label gridview. Show all posts
Monday, February 29, 2016
How to change a value of a DataItem in a GridViews RowDataBound Event
Saturday, July 7, 2012
Multiple Eval Fields in Gridview ItemTemplate
<%#
String.Format("{0} - {1}", Eval("Name1"),
Eval("Name2")) %>
Subscribe to:
Posts (Atom)