Hi,
I have developed a new tool window for my addin. I have added a user control to the tool window so that i can populate the output of some function in that data grid present in the tool window.
In the data grid i have created a data table which has rows. When i click on the rows in the data table, i am able to edit them. I want them to be
set to non-edit mode, so that the data displayed in the row of the data table is not editable. how can i achieve this?
below is the code about how i have created the data table:
-
DataTable d = new DataTable();
-
DataColumn col = new DataColumn("line_no", typeof(string));
-
DataColumn col1 = new DataColumn("words", typeof(string));
-
d.Columns.Add(col);
-
d.Columns.Add(col1);
-
foreach (line_num_keywords c in v)
-
{
-
DataRow dr = d.NewRow();
-
dr["line_no"] = c.line_number;
-
dr["words"] = c.captured_keyword;
-
d.Rows.Add(dr);
-
}
-
dataGridView1.DataSource = d;
-
Is there any fucntion which helps me to set the data table to non-edit mode?
Thanks,
Nayana