Answers for "c# datatable create column with value"

C#
4

C# create DataTable

DataTable dt = new DataTable(); 
dt.Clear();
dt.Columns.Add("Name");
dt.Columns.Add("Marks");

DataRow _ravi = dt.NewRow();
_ravi["Name"] = "ravi";
_ravi["Marks"] = "500";
dt.Rows.Add(_ravi);
Posted by: Guest on August-20-2020
0

datatable set data of column

const table = $("#table-id").DataTable();

table.cell(0, 0).data("new text"); //column idx, row idx
								   // can also use a jquery tr ref as first param
Posted by: Guest on May-13-2021

C# Answers by Framework

Browse Popular Code Answers by Language