Hi,
1) I need a column in radgrid with a dropdownlist with runtimebinding of the values.
2) The column should always be in the dropdownlist with the values.
3) The grid should not have edit command column.
4) Selected value of the dropdown should be from datasource of radgrid.
But my datasource is a list<class> . so, how do i set the datasourceid and datatext and datavalue if it is a list<class>.
Pls do elp me with code.
I'm doing the foll:
in ascx,GridTemplateColumn
<telerik:GridTemplateColumn HeaderText="mycol" UniqueName ="temp1">
<ItemTemplate>
<asp:DropDownList ID="ddl" runat="server"></asp:DropDownList>
</ItemTemplate>
</telerik:GridTemplateColumn>
in ascx.cs:
in grid's itemdatabound event , i do this
if
(e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
DropDownList ddl1 = (DropDownList)item["temp1"].FindControl("ddl");
ddl1.DataSourceID = ?
ddl1.DataTextField =?
ddl1.DataValueField =?
ddl1.DataBind();
}
I don't know what to fill in the ? with. pls help me with code.