2
Answers

Dynamic data binding (c#)

Ask a question
Eric

Eric

14y
6.6k
1
How can I dynamically bind data from a data set to a control?

For example, I have a dataset...

Dataset ds = new Dataset();
ds.ReadXML("file.xml");

and I want to bind a textbox to a specific row and column of that dataset, kind of like this:

textbox.bind(ds.tables["person"].rows[0]["name"];

I know the above code is incorrect, but is there anything like it that would allow me to bind a control dynamically?

Answers (2)