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

selecteditem.value

1 Answer 40 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
mww
Top achievements
Rank 1
mww asked on 18 Nov 2008, 08:41 PM
I have 3 combos on a page, the item selected in combo 1 determines the items displayed in combo 2 and the item selected in combo 2 determines the items in combo 3.  Ive used the ItemsRequested event and it all seems to work ok, but with one problem.  Whenever I need to refer to the selecteditem.value of combo 1 in my code behind, its always set as the first item in the list regardless of whats been selected, so im assuming the view state hasnt been updated because of the AJAX postbacks.  How can I get the selected value ?

Ivre tried the ClientItemsequestiong event but it too always has the firts item in the list.  This is what Ive tried

 

function OnClientItemsRequesting(sender, eventArgs) {  
                var context = eventArgs.get_context();  
                var typeCombo = $find("<%= RadComboBoxArtistType.ClientID %>");  
                context["FilterString"] = typeCombo.get_text();  
                var sel = typeCombo.get_text();  
            } 
<telerik:RadComboBox ID="RadComboBoxArtistGenre" Runat="server" OnClientSelectedIndexChanging="LoadCategories" OnClientItemsRequesting="OnClientItemsRequesting" 
                    OnClientItemsRequested="ItemsLoaded" Skin="Office2007"    
                    Width="250px" onitemsrequested="RadComboBoxArtistGenre_ItemsRequested"   
                        EnableLoadOnDemand="true" > 
                    <CollapseAnimation Duration="200" Type="OutQuint" /> 
             </telerik:RadComboBox> 

1 Answer, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 19 Nov 2008, 03:47 PM
Hi mark wheeler,

Please use the SelectedValue property of the combobox.

Regards,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
ComboBox
Asked by
mww
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Share this question
or