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

[Solved] ComboBox Problem

2 Answers 98 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bhushan
Top achievements
Rank 1
Bhushan asked on 13 Sep 2009, 10:57 AM
Hello,
I have two comboboxes. The second one is filled from the selection of the first.
But if I select a value in the 2nd combobox and click on somewhere else in the screen the value at the first place gets displayed other then the selected value.

Please help me to solve this problem.

Regards,

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 14 Sep 2009, 05:25 AM
Hello Bhushan,

Have you seen the online demo which demonstrates how the comboboxes can interact with each other using client-side methods and requesting the items on demand? Checkout the following link for online demo.
Related ComboBoxes

Could you provide some more information about the code that you tried to achieve this, in the case of this doesn't help?

-Shinu.
0
Bhushan
Top achievements
Rank 1
answered on 14 Sep 2009, 06:06 AM
Hello Shinu,
        Thanks for the reply.
The code of the first combo is 

<

 

td class="ReportTextboxWidth">

 

 

 

<telerik:RadAjaxPanel ID="rapXDDL" runat="server">

 

 

 

<telerik:RadComboBox ID="rcbXCategory" AutoPostBack="true" runat="server" Height="100px" >

 

</telerik:RadComboBox>

 

</telerik:RadAjaxPanel>

 

</td>
The code for the 2nd combo is 

 

<

 

telerik:RadComboBox ID="rcbXValue" runat="server" Skin="Vista" CausesValidation="false">

 

 

</telerik:RadComboBox>
I have used 

<

 

telerik:AjaxSetting AjaxControlID="rcbXCategory">

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="rcbXValue" LoadingPanelID="ralpLoadingPanel" />

 

 

</UpdatedControls>

 

 

 

 

</telerik:AjaxSetting>

 

 

 

 

 

 

The procedure code is given below
Private

 

 

 

 

 

 

Sub rcbXCategory_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles rcbXCategory.SelectedIndexChanged

 

 

 

prjUtilities.populateDropdown(rcbXValue, Get_AxisValues(rcbXCategory.SelectedValue), Name, ID)

 

rcbXValue.Items.Insert(0, New RadComboBoxItem(" ", "-1"))
End Sub

 

 

 

 

 

Public

 

 

Shared Function Get_AxisValues(ByVal intSelectedValue As Integer) As IQueryable(Of User_Defined_Metric)

 

Dim db As New DBDataContext()

 

Metric = (From UDMetrics In db.User_Defined_Metrics Select UDMetrics)

 

End If

 

Return Metric

 

End Function

 

 

The binding is proper just I have a poblem selection of the value in the 2nd combo.

 

if i select a value and click somewhere else in the screen the selection changes to the 1st value.

Regards,
Bhushan

 

 

 

 

Tags
ComboBox
Asked by
Bhushan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Bhushan
Top achievements
Rank 1
Share this question
or