hi,
i am having a rad combobox in the grid edit form template, and i want it to be populated from code behind with linq to sql data source
now i folllowed your example here http://www.telerik.com/support/kb/aspnet-ajax/grid/using-radcombobox-as-editor-in-template-column-of-radgrid.aspx
and added
protected void Grid_News_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
{
GridEditFormItem editFormItem = e.Item as GridEditFormItem;
RadComboBox Combo_Sections = editFormItem.FindControl("Combo_Sections") as RadComboBox;
var Query_Sections = from s in GetDB().News_society_sections select s;
Combo_Sections.DataSource = Query_Sections.ToList();
Combo_Sections.DataTextField = "SectionTitle";
Combo_Sections.DataValueField = "SectionID";
}
but the combo box is empty, also i want the combobox selected item value to be the one in hte DB when the edit form first launch.
thx in advanced.
i am having a rad combobox in the grid edit form template, and i want it to be populated from code behind with linq to sql data source
now i folllowed your example here http://www.telerik.com/support/kb/aspnet-ajax/grid/using-radcombobox-as-editor-in-template-column-of-radgrid.aspx
and added
protected void Grid_News_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
{
GridEditFormItem editFormItem = e.Item as GridEditFormItem;
RadComboBox Combo_Sections = editFormItem.FindControl("Combo_Sections") as RadComboBox;
var Query_Sections = from s in GetDB().News_society_sections select s;
Combo_Sections.DataSource = Query_Sections.ToList();
Combo_Sections.DataTextField = "SectionTitle";
Combo_Sections.DataValueField = "SectionID";
}
but the combo box is empty, also i want the combobox selected item value to be the one in hte DB when the edit form first launch.
thx in advanced.