Can someone help me with the following please.
I am currently doing a project and I have to creat a XML file for the layout of the database. I have created a Windows form with controls. Am trying to bind the controls such as the text box and list box to the data source.
I have tried reading the XML file into a dataset and then bind this dataset to a data grid but I Just cant seem to get my head round how to do the actual binding, as it just wont work.
I need some advice on what code to actually use for the binding to the source. My project has 2 forms, the 1st is a registration form and the 2nd form has the data grid and displays the students records.
As mentioned before ,the database layout is created by the XML file and I dont know if am meant to use a transformation process or use a XML DataDocument.
Thankyou to anyone who can give me any help on this.
Naresh KhannaPosted Jul 18, 2006, 7:25 PM
for VS2005
You are doing the right thing but when you are binding the data to ListControls, are you doing that with typed or Untyped dataset.
And if you are doing that with typed database as i suppose by your query, Use the typed dataset name in the fill method of the Datagridview otherwise you can preview data but can't bind it to the control.
1.drag a dataset.(dataset1)
2.Make tables and columns and their relationships.
3.drag Adapter
4.Map the tables
5.Generate the dataset from Data Menu
6.Whatever name you have given for previos dataset, this new dataset will be "1" more in the end i.e (dataset11)
7. use this in fill method and then you can see the results hwn you do F5.