I am trying to insert a button column into a datatable but it says that its an error. Any help pleasE?
ButtonColumn col = new ButtonColumn();
col.CommandName = "select";
col.ButtonType = ButtonColumnType.LinkButton;
col.HeaderText = "Edit";
dt.Columns.Add(col);
Add Buttoncolumn in DataTable its wired ...thats not possible at all...
The DataTable DataColumn DataType property supports the following base .NET Framework data types:
Sample code to add coplumn
DataTable workTable = new DataTable("Customers");
DataColumn workCol = workTable.Columns.Add("CustID", typeof(Int32));
workCol.AllowDBNull = true;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With