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

How to use GridDropDownColumn without declarative binding

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 10 Oct 2008, 09:18 AM
Hello,

The table I want to edit contains an int column and I need to display a text value according a lookup table which contains int/text pairs.
This fit ideally with GridDropDownColumn but problem is that the lookup table is generated in code behind.
I tryed different options with RadGrid_ItemDatabound and playing with EditMode according online documentation status without total success: when no columns are in edit mode, my column stay empty (but I have values in the DataTable), when one column goes in editMode, I have a RadCombobox displayed with my values set from the datasource I set in the editor, and curiously all the rows following the edited one display now values  ? When I stop editing the columns come back to empty display.

Any help welcome
CS

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 14 Oct 2008, 07:49 AM
Hi Christian Surieux,

This sounds like a problem with the way the control is databound. One possible option in this case would be to use a template column and have one control for normal mode, and one for edit mode (item and edititem templates). This would offer you enough flexibility to achieve the task at hand. Also, you can have the combo to Load on demand, which would allow you to feed data to it in the ItemsRequested event handler.
I hope these suggestions help.

Best wishes,
Yavor
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Yavor
Telerik team
Share this question
or