I understand that already, thanks. But, if my datasource is a DataSet or DataTable, how exactly would I setup the entire dropdownlist in the rad grid? I need to set the datasource to a dataset, etc. I figured out by myself how to do it in codebehind now :
protected void grdResults_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
DropDownList ddl = (DropDownList)item["tplStatus"].FindControl("ddlStatus");
ddl.DataSource =
ApplicationState.Current.ApplicationStatus;
ddl.DataTextField =
"ABBRV_TXT";
ddl.DataValueField =
"STATUS_CD";
ddl.SelectedValue =
DataBinder.Eval(item.DataItem, "STATUS_CD").ToString();
ddl.DataBind();
}
}
Databinder.eval is in
using
System.Web.UI;
But, I doubt that's the most efficient way to do it??