You can find another control like hiddenfield/label etc that bound to db. Use the value to generate select query or passing parameter to populate ddl items using.
The sample code above for ddl inside itemtemplate, If you have ddl inside edititem use rowediting event to findcontrol.
paulmur
0 Points
3 Posts
datagrid dropdown list options
Jan 10, 2013 12:36 AM|LINK
oned_gk
All-Star
31798 Points
6499 Posts
Re: datagrid dropdown list options
Jan 10, 2013 12:50 AM|LINK
Use rowdataboud event
If e.Row.RowType = DataControlRowType.DataRow Then Dim Ddl1 As DropDownList = CType(e.Row.FindControl("Dropdownlist1"),Dropdownlist) End Ifpaulmur
0 Points
3 Posts
Re: datagrid dropdown list options
Jan 10, 2013 01:43 AM|LINK
oned_gk
All-Star
31798 Points
6499 Posts
Re: datagrid dropdown list options
Jan 10, 2013 01:54 AM|LINK
You can find another control like hiddenfield/label etc that bound to db. Use the value to generate select query or passing parameter to populate ddl items using.
The sample code above for ddl inside itemtemplate, If you have ddl inside edititem use rowediting event to findcontrol.
paulmur
0 Points
3 Posts
Re: datagrid dropdown list options
Jan 10, 2013 02:04 AM|LINK