I have a radspell with controlToCheck(Textbox1) in my web form..i want to activate the radspellcheck on button onclientclick event because button also have onclick event..i need to fire the radspellcheck before button onclick event...Simply i want a spellcheck on button submit...i have tried but onclick event only fired fiirst..could please some example please...
4 Answers, 1 is accepted
You need to cancel the postback, let the spellcheck work and initiate the postback again when it finishes. Otherwise, the postback will dispose the spell because it works on the client.
There are various ways to do this and perhaps this KB article will help you with one approach: http://www.telerik.com/support/kb/aspnet-ajax/spell/details/invoke-separate-spell-check-for-each-textbox-and-submit-the-form-on-success.
Another suggestion is to use the client-side API and events of the control:
- to know when the check finishes: http://www.telerik.com/help/aspnet-ajax/spell-client-check-finished.html.
- to see how to invoke it from a client-side function you have: http://www.telerik.com/help/aspnet-ajax/spell-how-to-launch.html.
For your convenience I prepared a small example here:
Regards, Marin Bratanov
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Please try to attach the OnClientDialogClosed event of RadSpell and try to call the OnClick event of RadButton from OnClientDialogClosed event as follows and also set the AutoPostBack property of RadButton as false.
Thank you so much...it works fine...
Thank you so much for the sample..It works after adding the Shinu point...