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

GridDropDownColumn dynamic databound

2 Answers 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
burak
Top achievements
Rank 1
burak asked on 16 Jul 2009, 06:32 AM
Hello;

I want a dropdownlist like this

<asp:DropDownList ID="den" runat="server" >
        <asp:ListItem>a</asp:ListItem>
        <asp:ListItem>b</asp:ListItem>
        <asp:ListItem>c</asp:ListItem>
        <asp:ListItem>d</asp:ListItem>
</asp:DropDownList>
       
However I want to use GridDropDownColumn and I don't want to use datasource for this. What and how can I do ?

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Jul 2009, 07:01 AM
Hi Burak,

Please go through the following link to online documentation. I hope this will help you in configuring "GridDropDownColumn".
Customize/Configure GridDropDownColumn

-Shinu.
0
burak
Top achievements
Rank 1
answered on 16 Jul 2009, 08:19 AM
Thanks Shinu;
This example works but I have another problem. It doesn't save the selected value.
I think I have to save manually but I don't know how ?

  Dim editor As GridDropDownListColumnEditor = CType(editMan.GetColumnEditor("DbFieldType"), GridDropDownListColumnEditor)
            'in case you have RadComboBox editor for the GridDropDownColumn (this is the default editor), 'you will need to use ComboBoxControl below instead of DropDownListControl
            'Then you can modify the list control as per your custom conventions
            editor.DataSource = New Object() {"F", "P", "V", "N"}
            Editor.DataBind()

This code is in RadGrid1_ItemDataBound

Tags
Grid
Asked by
burak
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
burak
Top achievements
Rank 1
Share this question
or