where does the DataGrid.DataSource property get set?

D

Dave

Hi have a question about the DataGrid.DataSource property. When you
use Visual Studio to set this property in Design mode (using the
Properties dialog), Visual Studio doesn't generate any code stating
something like

myGrid.DataSource = myDataSet;

as you might think it would. Yet when you fill the appropriate DataSet
and call DataBind() on the DataGrid, the grid gets set up with all the
right info. Most of the time when you change something in design mode,
the Web Form Designer will auto generate code for you, why isn't this
happening in the case of DataSource? How does the grid know which data
set to use? Is it stored in some other file?

Thanks,
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top