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

[Solved] GridDropDownColumn bound to static RadComboBox

1 Answer 387 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Atlas
Top achievements
Rank 1
Atlas asked on 22 Jul 2009, 04:42 PM
I have an updateable radgrid for which I would like to use a static combo box as an edit control.
How do I bind the edit control to the grid column, and how will it be displayed when not in edit mode?

<

 

MasterTableView Width="100%" EditMode="InPlace"

 

<

 

telerik:GridDropDownColumn DropDownControlType="RadComboBox"

 


 

<telerik:RadComboBox ID="RadComboBox1" runat="server">

 

 

<Items>

 

 

<telerik:RadComboBoxItem Value="3" Text="Excellent" />

 

 

<telerik:RadComboBoxItem Value="2" Text="Good" />

 

 

<telerik:RadComboBoxItem Value="1" Text="Fair" />

 

 

<telerik:RadComboBoxItem Value="0" Text="Poor" />

 

 

<telerik:RadComboBoxItem Value="4" Text="N/A" />

 

 

</Items>

 

 

</telerik:RadComboBox>

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Jul 2009, 05:19 AM
Hi Nano Sacay,

I would suggest you to use a GridTemplateColumn with a RadComboBox in its EditItemTemplate instead of a GridDropDownColumn. Here is a Sample aspx code:

 
   <telerik:GridTemplateColumn UniqueName="CheckBoxCol"  HeaderText="TempColumn" > 
              <ItemTemplate> 
                  <%#Eval("Status") %> 
              </ItemTemplate> 
             <EditItemTemplate> 
                 <telerik:RadComboBox ID="RadComboBox1" runat="server"
                   <Items> 
                        <telerik:RadComboBoxItem Value="3" Text="Excellent" /> 
                        <telerik:RadComboBoxItem Value="2" Text="Good" /> 
                        <telerik:RadComboBoxItem Value="1" Text="Fair" /> 
                        <telerik:RadComboBoxItem Value="0" Text="Poor" /> 
                        <telerik:RadComboBoxItem Value="4" Text="N/A" /> 
 
                   </Items> 
                 </telerik:RadComboBox> 
             </EditItemTemplate> 
         </telerik:GridTemplateColumn> 

You can also refer the following help article to get more details about configuring GridDropDownColumn.
Customize/Configure GridDropDownColumn

Thanks
Shinu




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