ItemDataBound and GridDropDownColumn question

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

    Posted 03 Sep 2008 Link to this post

    Hello,

    I have a column in a DataTable wich cotains a value frm an enum.
    To display and editthis value in a radGrid I use a GridDropDownColumn.

    But I have some difficulties:

    1) It is impossible for me to bind declaratively the DropDown to a table as my values are in an enum, so to insert/modify, I added an ItemDatabound handler where I find the radComboBox by its uniqueName then add RadComboboxItems to it.
    Here I have found no way to bind to some table. Its working as this but not very effiscient.
    2) when not in Edit mode, I am unable to display in the column containing the int value a text from my enum text rather then an int.
    In fact I display nothing.
    Previous strategy of finding the RadComboBox and adding items does not work.
    I have tryed to find my item and set display text manually, using  e.Item["ItemUniqueName"].Text, but I get " "


    Shouldn't all this be automatic ?

    Thanks for help.
    CS
                       
  2. andy
    andy avatar
    19 posts
    Member since:
    Jun 2008

    Posted 03 Sep 2008 Link to this post



    2) e.item["itemUniqueName"].text giving u weird result, i assume it's not a gridBoundColumn.

    Workaround it, "itemUniqueName" remains as it is, but u add one more gridBoundColumn as "itemUniqueNameHIDDEN" set it to visible = false. It act as a Hidden Field.

    And use itemUniqueNameHIDDEN when u need the value for displaying manually.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top