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

[Solved] SelectedValue property is not being set in combobox after selecting item that is loaded from a webservice

7 Answers 246 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jason Maronge
Top achievements
Rank 1
Jason Maronge asked on 29 Jan 2008, 07:17 PM
SelectedValue property is not being set in combobox after selecting item that is loaded from a webservice.  I have a webusercontrol I am using as the edit control for a radgrid and I have a combobox in the usercontrol.  My combobox is loading the items from a webservice.  When I go to save the changes the Text property is set to the correct text but the SelectedValue is not set. I have tried to hook the OnClientSelectedIndexChanging event and set the value myself but it is not persisting to the server side.  Any help with this would be really appreciated.

Jason

7 Answers, 1 is accepted

Sort by
0
Jason Maronge
Top achievements
Rank 1
answered on 29 Jan 2008, 08:43 PM
I was able to get it to work doing the following:

            window.OnClientSelectedIndexChangingProc = function(sender, eventArgs)  
            {  
                try{  
                        var text = eventArgs.get_item().get_text();  
                        var value = eventArgs.get_item().get_value();  
                        var comboItem = new Telerik.Web.UI.RadComboBoxItem();  
                        sender.get_items().clear();   
                        sender.trackChanges();  
                        comboItem.set_text(text);  
                        comboItem.set_value(value);  
                        sender.get_items().add(comboItem);  
                        sender.commitChanges();   
                    }catch(e){}  
            } 

Is this how we will have to get it to work from now on or are their plans for it to populate the SelectedValue field for us?

Jason
0
Rosi
Telerik team
answered on 30 Jan 2008, 12:36 PM
Hello Jason Maronge,

Please find attached the latest build. Try it and let us known is this helps.

Kind regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jason Maronge
Top achievements
Rank 1
answered on 30 Jan 2008, 04:08 PM
Looks like the hotfix corrected the problem.  Should I open a support ticket to get a dev version?  How long until the next release?  If it is not too long I could get by with the workaround.

Jason
0
Nikolay
Telerik team
answered on 30 Jan 2008, 04:40 PM
Hi Jason Maronge,

You can open a support ticket under your licensed Client.net account and we will attach a dev build right away.

Regards,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jason Maronge
Top achievements
Rank 1
answered on 27 Mar 2008, 08:32 PM
Sorry about now responding to this earlier.  I am currently using the 2007.03.1425.20 version and still having an issue with this.  Problem now is that the workaround keeps throwing a JS error.

Line: 5944
Char: 49
Error: Unspecified error.

Has this been fixed yet?  If so, when will it be released?  If you have a hotfix for it I will be glad to open a support ticket to get it.

Jason
0
Nikolay
Telerik team
answered on 28 Mar 2008, 08:10 AM
Hi Jason Maronge,

I believe that the best way to proceed would be if you isolate the problem in a small and running project and attach the files to a new support thread. We will test them locally and try to find a working solution for you.

Thanks for your time.

Expecting your reply,
Nick
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jason Maronge
Top achievements
Rank 1
answered on 28 Mar 2008, 02:48 PM
My apologies.  In creating the test app I noticed that this project was indeed using an older version.  I have replaced it with the current release and it works great. 

Jason
Tags
ComboBox
Asked by
Jason Maronge
Top achievements
Rank 1
Answers by
Jason Maronge
Top achievements
Rank 1
Rosi
Telerik team
Nikolay
Telerik team
Share this question
or