Hi, everybody.
Here in my company we have found a trouble with GridDropDownCollum, after we upgraded to Microsoft Dot Net Framework 4.0, this collumns only show the first value of the DataSource for each item of the DataSource, we have the same page running under the Dot Net Framework 2.0 and it works well.
This is the code that is used to populate the GridDropDownCollum:
This is the aspx code of the collun:
This is the class Status that you see in
I have tried the examples describeds in this page: http://www.telerik.com/help/aspnet-ajax/grdcustomizeconfiguregriddropdowncolumn.html,
but I had the same problem.
As I Sad I am using Microsoft Dot Net Framework 4.0 , and Rad Controls Q3 2010.
Is there a easy way to fix this problem?
Here in my company we have found a trouble with GridDropDownCollum, after we upgraded to Microsoft Dot Net Framework 4.0, this collumns only show the first value of the DataSource for each item of the DataSource, we have the same page running under the Dot Net Framework 2.0 and it works well.
This is the code that is used to populate the GridDropDownCollum:
protected void grd_list_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode) { GridEditableItem editedItem = e.Item as GridEditableItem; GridEditManager editMan = editedItem.EditManager; GridDropDownListColumnEditor editor = (GridDropDownListColumnEditor)(editMan.GetColumnEditor("StatusUniqueName")); //Ativo' WHEN STATUS = 'P' THEN 'Pausado' WHEN STATUS = 'F' THEN 'Finalizado ArrayList ds = new ArrayList(); ds.Add(new status("A", "Ativar")); ds.Add(new status("P", "Pausar")); ds.Add(new status("F", "Finalizar")); //string val = oMonitor.ExecuteScalarString("select STATUS from MAILING WHERE ID = " + editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["Id"]); string s = DataBinder.Eval(editedItem.DataItem, "StatusValue").ToString(); //the field should point to the ListValueField of the dropdown editor editor.DataSource = ds; editor.DataTextField = "Status"; editor.DataBind(); editor.SelectedValue = s;}This is the aspx code of the collun:
<telerik:GridDropDownColumn UniqueName="StatusUniqueName" ListDataMember="Status" ListTextField = "Status" ListValueField="StatusValue" DataField="StatusValue" HeaderText="Status"> </telerik:GridDropDownColumn>This is the class Status that you see in
grd_list_ItemDataBound:public class status { private string _value; private string _text; public status(string value, string text) { _value = value; _text = text; } public string Status { get { return _text; } set { _text = value; } } public string StatusValue { get { return _value; } set { _value = value; } } };I have tried the examples describeds in this page: http://www.telerik.com/help/aspnet-ajax/grdcustomizeconfiguregriddropdowncolumn.html,
but I had the same problem.
As I Sad I am using Microsoft Dot Net Framework 4.0 , and Rad Controls Q3 2010.
Is there a easy way to fix this problem?