Hello,
As the subject says, I want to find a way through which I can apply data validation on the columns that are generated from a XML file when I read it from a DataSet Object.
There is a column which should only accept numeric values between a specific range. I know how to do it when I create my own columns and set appropriate properties for the same. but In case of this way of using DataSet I can't find a solution.
Below is the code I used to populate the data in the grid:
string datapath = <PATH TO XML>;
DataSet dataSet = new DataSet();
dataSet.ReadXml(datapath);
sfDataGrid1.DataSource = dataSet.Tables[0];
Furthermore, Why using this method it is creating new columns even If I've already defined the columns during design time? It creates 3 columns with same header text and then insert values in further rows causing previous cells to left empty. Is there anyway I can only extract values from the DataSet and insert below an appropriate column.
You can see very well in the Image what exactly is happening (new columns instead of existing ones).
Thank you