4 Answers, 1 is accepted
0
Hi Trong,
You could hook to the OnClientSelectedIndexChanging client event of RadComboBox, check the condition in the event handler and cancel the event if required. Further, if you had subscribed to the server OnSelectedIndexChanged event, a postback will be made in case you have not canceled the [...]Changing event.
More information about the needed client-side event you could find here: OnClientSelectedIndexChanging.
Kind regards,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You could hook to the OnClientSelectedIndexChanging client event of RadComboBox, check the condition in the event handler and cancel the event if required. Further, if you had subscribed to the server OnSelectedIndexChanged event, a postback will be made in case you have not canceled the [...]Changing event.
More information about the needed client-side event you could find here: OnClientSelectedIndexChanging.
Kind regards,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Trong
Top achievements
Rank 1
answered on 04 Jun 2008, 03:19 AM
Hi Simon,
My problem:
Example: I've ComboBox with 3 item
1. Select Country
2. Viet Nam
3. USA
When i choose item 0 (Select Country), I don't want submit form.
OnClientSelectedIndexChanging event raising before Combo change value.
I don't known how to check which item choosed (Select Country or Viet Nam or USA). I have to using OnClientSelectedIndexChanged event.But I can't stop form submit (return false;)
Please help me,
Thanks!
My problem:
Example: I've ComboBox with 3 item
1. Select Country
2. Viet Nam
3. USA
When i choose item 0 (Select Country), I don't want submit form.
OnClientSelectedIndexChanging event raising before Combo change value.
I don't known how to check which item choosed (Select Country or Viet Nam or USA). I have to using OnClientSelectedIndexChanged event.But I can't stop form submit (return false;)
Please help me,
Thanks!
0
Hi Trong,
You can access the Item that is about to be selected by calling eventArgs.get_item() in the OnClientSelectedIndexChanging event handler.
Another approach for accomplishing the same goal is by using ASP.NET validation as shown in our online example RadComboBox Validation.
Best wishes,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You can access the Item that is about to be selected by calling eventArgs.get_item() in the OnClientSelectedIndexChanging event handler.
Another approach for accomplishing the same goal is by using ASP.NET validation as shown in our online example RadComboBox Validation.
Best wishes,
Simon
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Trong
Top achievements
Rank 1
answered on 05 Jun 2008, 05:53 AM