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

eventarqs.set_cancel is not working

1 Answer 107 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Taeho Yoo
Top achievements
Rank 1
Taeho Yoo asked on 17 Sep 2008, 02:06 AM
Hi,

We are using Telerik verion 2008.1.619.35
For radComboBox

OnClientSelectedIndexChanged

="HandleEndChanging"

function

HandleEndChanging(sender, eventarqs) {
  var item = eventarqs.get_item();
  alert(
"Change to new item('" + sender.get_text() + "')");
  alert(0)
  eventarqs.set_cancel(
true); // Object doesn't support this property or method
  alert(1)
}


alert(0) is called correctly and then eventarqs.set_cancel(true); generates a javascript error
"Object doesn't support this property or method"

Am I missing something here?

Thanks,

Toby

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 17 Sep 2008, 06:08 AM
Hi Taeho ,

The reason for the problem is that you hooked on the OnClientSelectedIndexChanged event instead of  on the OnClientSelectedIndexChanging.

I suggest you edit your code by the following way;

OnClientSelectedIndexChanging ="HandleEndChanging"



Regards,
Rosi
the Telerik team

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