Set Column Width in Dynamic Table
-
I create a dynamic table using the code below (c#), but I couldn't figure out how to set the column width (in column3 comments). DataTable tbl; DataColumn col; tbl = new DataTable(); col = new DataColumn("column1"); tbl.Columns.Add(col); col = new DataColumn("column2"); tbl.Columns.Add(col); col = new DataColumn("column3 comments"); tbl.Columns.Add(col); tbl.AcceptChanges(); DataRow r; r = tbl.NewRow(); r["column1"] = "This is 1"; r["column2"] = "This is 2"; r["column3 comments"] = "Comments is really long & I need to set the width for this"; tbl.Rows.Add(r);
-
I create a dynamic table using the code below (c#), but I couldn't figure out how to set the column width (in column3 comments). DataTable tbl; DataColumn col; tbl = new DataTable(); col = new DataColumn("column1"); tbl.Columns.Add(col); col = new DataColumn("column2"); tbl.Columns.Add(col); col = new DataColumn("column3 comments"); tbl.Columns.Add(col); tbl.AcceptChanges(); DataRow r; r = tbl.NewRow(); r["column1"] = "This is 1"; r["column2"] = "This is 2"; r["column3 comments"] = "Comments is really long & I need to set the width for this"; tbl.Rows.Add(r);
Ummmm... I assume you mean when it's displayed somehow?
-
Ummmm... I assume you mean when it's displayed somehow?