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

[Solved] ComboBox in Grid and OnClientSelectedIndexChanged

2 Answers 164 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Andreas Kaech
Top achievements
Rank 1
Andreas Kaech asked on 26 Jun 2008, 05:52 PM
Hi Telerik,
I want to reorder the rows of a grid with the help of a ComboBox in each row (telerik:GridTemplateColumn).
And here my problem:
I need something like ComboBox.selectedIndex += 1
But in your Client-Side API I've found only
var items = combo.get_items();
var incItem=combo.get_selectedIndex()+1;
var item = items.getItem(incItem);
item.select();
The issue here is, that each item.select() 
triggers OnClientSelectedIndexChanged.
Is there a possibility to change the selected index without triggering an event?

I hope you understand my problem ;-)

Best regards,
Andreas

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosi
Telerik team
answered on 27 Jun 2008, 11:32 AM
Hello Andreas ,

Please try the following code:

var items = combo.get_items();  
var incItem=combo.get_selectedIndex()+1;  
var item = items.getItem(incItem);  
combo.set_text(item.get_text());  
combo.set_value(item.get_value()); 

Hope this helps.

Regards,
Rosi
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Andreas Kaech
Top achievements
Rank 1
answered on 27 Jun 2008, 03:39 PM
Hi Rosi,
yes, this helped, thanks.

Best regards,
Andreas
Tags
ComboBox
Asked by
Andreas Kaech
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Andreas Kaech
Top achievements
Rank 1
Share this question
or