Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
Populating Template controls from a database
posted

Hi,

I am building a website using asp.net 3.5

I have a webdatagrid with two template columns.  One column contains a DropDownList control, the other contains a WebDatePicker.  The dropdown is populated by using an SQLDataSource object so that I have a list of values . 

The idea is that the WebDataGrid will be populated by database values, ie. the DropDownList will display the database value for a certain row when the Page is loaded, likewise the webdatepicker.

I am using another, seperate sqldatacourxce object to try and populate the webdatagrid, however, I cannot select the correct field in either the dropdownlist or the webdatepicker.  

Do you have code to do this or to point me in the right direction?

many thanks