Can some one please help me with this databinding problemThe problem that I have is in the binding, as when I try to simple bind a text box control to the data source in the data set I get an error message saying that I "cannot bind to a property or column on data source 'studentID'.
I cant understand this, as I copy the XML data source to a dataset that I have created and then I try do the above binding. I am able to create a datagrid and bind that to the data set for viewing the tables but I need to bind the text boxes in the windows forms to the columns such as StudentID in the dataset so I can display the current record on the windows form so that the relevant data can be shown in the correct boxes on the form and for updating.
//The code below creates a dataset and reads the xml source code and the schema into the new //data set.DataSet mydataset = new DataSet();mydataset.ReadXml("C://Student1.xml"); mydataset.ReadXmlSchema("C://Student1.xml");
//The code below is where I actually try to bind a text box "StudID" to the source codedatamember'StudentID'. The table in the dataset is called 'students'. The program compiles ok but when I run the form, the error message as mentioned above is displayed and cannot bind. txtStudID.DataBindings.Add("Text", mydataset.Students, "StudentID");The xml source code is displayed below and 'StudentID' is the data member in the data to which am trying to bind to.
<?xml version="1.0" encoding="utf-8" ?>
<Register xmlns="http://tempuri.org/Students.xds">
</
Any help in this matter would be greatly appreciated Thankyou