This is a migrated thread and some comments may be shown as answers.

GridDropDownColumn Creating Problems

1 Answer 56 Views
This is a migrated thread and some comments may be shown as answers.
Samee Mir
Top achievements
Rank 1
Samee Mir asked on 06 Jul 2010, 04:17 PM
Check out the code below  
protected void MetadataRadGrid_ItemDataBound(object sender, GridItemEventArgs e)  
if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
GridEditableItem gridEditableItem = (GridEditableItem)e.Item;  
GridEditManager gridEditManager = gridEditableItem.EditManager;  
ArrayList metadataTypeArrayList = new ArrayList();  
GridDropDownColumnEditor gridDropDownColumnEditor = (GridDropDownColumnEditor)gridEditManager.GetColumnEditor("MetadataType");  
gridDropDownColumnEditor.DataSource = metadataTypeArrayList;  
<telerik:GridDropDownColumn UniqueName="MetadataType" DataField="MetadataType" HeaderText="MetadataType"  SortExpression="MetadataType" > 


i am using GridDropDownColumn in radgrid and facing some problems


Firstly GridDropDownColumn is not displaying the datafield value.
I have defined datafield datatext properties of the GridDropDownColumn so that it can pick the values of RadGrid datasource and display it when ever the grid displaying the data in read mode.



I also have populated GridDropDownColumn if it is in editable state with a hashtable in ItemDataBound event  of RadGrid.Means it will only be populated with hashtable in edit mode or add mode.

How ever when i add a new record in the grid and press shows me all the data values in this GridDropDownColumn field.




Please tell me the solution of this problem

Secondly tell me the way how can i store some values in this GridDropDownColumn  in ItemCommand event when in edit mode.

Reply me ASAP.




1 Answer, 1 is accepted

Sort by
Iana Tsolova
Telerik team
answered on 09 Jul 2010, 03:08 PM
Hello Samee,

Try setting the ListTextField and the ListValueField for the problematic GridDropDownColumn as described in the below article:

Also, please specify what kind of values do you need to save and on which event do you want to save and access them? Any additional information on your scenario might help us in finding a proper resolution for you.

All the best,
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Samee Mir
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Share this question