How to empty specific column of numbers from datagridview? (i mean erase the values without header, not delete the column).
ERASE datagridview calumn values, so i dont need to do it manually and continue writing new ones.
How i created the datagridview:
i created a database table, with 5 ID's all of datatype "int", i connected the datagridview through DataSource, bindingsource. And when i put values in the table and press button:(button code below)
It will save the values into DataTable and draw a chart.
For example the first ID in the table is : "x1"
chart1.Series["x1"].YValueMembers = "x1";
chart1.Series["x2"].YValueMembers = "x2";
chart1.Series["x3"].YValueMembers = "x3";
chart1.Series["x4"].YValueMembers = "x4";
chart1.Series["x1"].XValueMember = "y1";
chart1.Series["x2"].XValueMember = "y1";
chart1.Series["x3"].XValueMember = "y1";
chart1.Series["x4"].XValueMember = "y1";
chart1.DataSource = database1DataSet2.Table;
What i think is neccesery is to actually delete the values from DataTable but i dont how to do it.
What I have tried:
I tried making the columns "null" but didnt solve anything.
I think at some point i managed to empty the column, i dont even remember how i did it, it was weeks ago, but when i did erase it and then write new numbers the chart didnt draw the lines. What i did was i deleted the column and added a new one. But as i mentioned, it didnt work. Maybe i could just delete the column of numbers from datatable, somehow.