ASP.NET DataGrid - DropDownLists in separate rows?

Typically, when you need different behavior on different rows, the best route to go is with the RowDataBound event. This event will allow you to inspect the row's DataItem to conditionally bind any controls in Template columns.

You have to check the event RowdataBound event and inside it check the drop down list or you can use tag AlternatingItem in your source code and in this case you have two rows repeated with grid and set the #Eval of each dropdownlist to it's appropriate data that you want from the datasource or give it's items thier values if the items are static.

To add to Ken Browning's response (if I understood him correctly). How about creating a new control, inheriting from Datagrid. Within that control, have a public generic list of dropDowns: public List FruitLists { get;set; } If you add the control to a cell in the RowDataBound event like Ken suggested, add the DropDownList to the list, and you'll be able to iterate through them after postback.

I hope that helps!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions