Hi, i'm trying to add a checkbox to a datagrid but don't seem to get anywhere. I got to add a new column but that's where it stops.
I'm reading data out of my database and then deleting the first column of that dataset's table as it is not needed, then adding another column for the checkbox to be in.
Here is my code: Can anybody please give me some advice?
(I have visited alot of sites and other forums sofar but don't seem to get a solution):(
(Please note that i'm using a masterpage)
//DATA GRID VIEW FILL
clsUploadCallArray getallcalls = new clsUploadCallArray(emp.E_mobile.ToString());
int c = getallcalls.UploadCallsObj.Count;
DataSet uploadDS = getallcalls.UplCallDS;
DataTable uploadDT = uploadDS.Tables["Upload"];
uploadDT.Columns.Remove("Upl_ID");
uploadDT.Columns.Add();
dgv_Calls.DataSource = uploadDT;
dgv_Calls.DataBind();
dgv_Calls.Visible = true;
//set column names
//header text
dgv_Calls.HeaderRow.Cells[0].Text = "Tel";
dgv_Calls.HeaderRow.Cells[1].Text = "Start Date/Time";
dgv_Calls.HeaderRow.Cells[2].Text = "Duration(seconds)";
dgv_Calls.HeaderRow.Cells[3].Text = "Transaction";
dgv_Calls.HeaderRow.Cells[4].Text = "Destination";
dgv_Calls.HeaderRow.Cells[5].Text = "Amount";
dgv_Calls.HeaderRow.Cells[6].Text = "Roaming";
dgv_Calls.HeaderRow.Cells[7].Text = "Discount";
dgv_Calls.HeaderRow.Cells[8].Text = "Mark";
//footer text
dgv_Calls.FooterRow.Cells[0].Text = "Tel";
dgv_Calls.FooterRow.Cells[1].Text = "Start Date/Time";
dgv_Calls.FooterRow.Cells[2].Text = "Duration(seconds)";
dgv_Calls.FooterRow.Cells[3].Text = "Transaction";
dgv_Calls.FooterRow.Cells[4].Text = "Destination";
dgv_Calls.FooterRow.Cells[5].Text = "Amount";
dgv_Calls.FooterRow.Cells[6].Text = "Roaming";
dgv_Calls.FooterRow.Cells[7].Text = "Discount";
dgv_Calls.FooterRow.Cells[8].Text = "Mark";
dgv_Calls.Attributes["style"] = "border-color:black";