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

Need a RADGrid sample with ComboBoxes

5 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Clement
Top achievements
Rank 2
Clement asked on 01 Jun 2008, 09:32 AM
Need a working sample of Multiple comboboxes in a RadGrid with All Editing functions.

We have a requirement of using the RadGrid for Bill of Materials where two columns need to have ComboBoxes and the 2nd combobox should populate data based on the 1st combobox selection.

Pls help

Thanks
Clement

5 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 02 Jun 2008, 05:17 AM
Hi Clement,

I hope the following online demo will guide you.
Accessing cells and rows

Princy.
0
Clement
Top achievements
Rank 2
answered on 02 Jun 2008, 07:14 AM
Thanks for the link Princy and i appreciate your help !

Our Problem in Detail :

We added a Hierarchy Grid and added Master and Details View and everything was working fine with SQLDataSources.

We added EditFormSettings with our own Template and we wanted to add Multiple Combo Boxes (same as Multiple ComboBox example). So that when users select the Seal Type, SealCode is populated in the Combo Box 2.

Our Problem started here :

We are getting the following Error :

1. The name 'RadComboBox1' does not exist in the current context

2. The name 'RadComboBox2' does not exist in the current context

My Structure of the RADGrid is :

Master Table
        <EditFormSettings>
                RadComboBox1
                RadComboBox2
        </EditFormSettings>
    
        Details Table (0)

        Details Table (1)

            Details Table (1,0)
   
We are not able to access the RadComboBox 1 and 2 from the codebehind file.

Looks like we are missing the right way to reference it.

We followed the Update/Delete/Insert Hierarchy Grid Example ( http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/DataEditing/ThreeLevel/DefaultCS.aspx ) ; which used automatic posting BUT we tried to add EditMode = EditForms and to complicate things, two comboboxes that are related and the value from the Table which gets populated is having ID (SealTypeID, SealCodeID) But when we open it for editing we should show the Description for users and while Update or Insert we need to pass the ID for the Tables.

Hope u understand the issue....

Please advice and please find our project files at http://www.telerik.com/ClientsFiles/087200_TelerikTest.zip 

We are stuck and i need help since this is the first program we are working with RAD Controls.

Thanking u in advance !
0
Shinu
Top achievements
Rank 2
answered on 02 Jun 2008, 10:00 AM
Hi Clement,

Try adding the ComboBoxes inside the FormTemplate tag as shown below.

ASPX:
<EditFormSettings EditFormType="Template"  >  
 <FormTemplate> 
     <telerik:RadComboBox ID="RadComboBox1" runat="server"
     </telerik:RadComboBox> 
     <telerik:RadComboBox ID="RadComboBox2" runat="server"
     </telerik:RadComboBox> 
 </FormTemplate> 
</EditFormSettings> 


Thanks
Shinu.
0
Clement
Top achievements
Rank 2
answered on 02 Jun 2008, 10:32 AM
Thanks Shinu,

We had exactly done the same. Pls refer to the code i had attached above.

Thanks for your help !

Clement
0
Shinu
Top achievements
Rank 2
answered on 02 Jun 2008, 10:46 AM
Hi Clement,

Can you try moving the Javscript code snippet from the FormTemplate and see whether it is working properly?

Shinu.
Tags
Grid
Asked by
Clement
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Clement
Top achievements
Rank 2
Shinu
Top achievements
Rank 2
Share this question
or