How to use GridDropDownColumn without declarative binding

2 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 10 Oct 2008 Link to this post


    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
  2. Yavor
    Yavor avatar
    11 posts

    Posted 14 Oct 2008 Link to this post

    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,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top