Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo Box within a DataGrid

Status
Not open for further replies.

FederalProgrammer

Programmer
Jul 2, 2003
318
CA
I am binding my datagrid to a datatable.
All, but one of the columns are using the source datatable.
However, in one column, I'm putting a combo box that should contain numbers from 1 to n...
I have an arraylist of numbers... How can I bind this DropDownList this arraylist of numbers? My data grid is already bounded to another datasource (and I need this boundage... I just want a different boundage for this dropdown list column)

I don't have to take this approach... feel free to suggest any solution that allows me to populate these combo boxes with numbers from 1 to n without my datagrid loosing its original boundage to its datasource...

cheers!


---------------
 
I got it:
I should simply implement the "onLoad" event and map it to a function that will populate the dropdown list w/ numbers...
Now I should simply implement the "selectedIndex_changed" event. However, the concern is, how will I know, to which one of datagrid's datasource, the selected dropdown list belongs....

For example, let's say, this is a shopping cart... so the datasource for this datagrid, is a table w/ the images, and prices and all that stuff... for each one of the rows, I have a drop down list whose selectedIndex_Changed event is implemented... How do I know, to which product, selected quantity belongs?


any ideas?


---------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top