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

Triggering JavaScript on SelectedIndexChanged 'after' postback

1 Answer 156 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Brock
Top achievements
Rank 1
Brock asked on 20 Jul 2012, 03:14 PM
I have a ComboBox within a RadGrid that performs a database lookup within its selectedindexchanged event in the code behind and populates several other radnumerictextboxes within that same grid row. I have a JavaScript function on the page that is called when the value of some of these radnumerics (such as quantity) are changed in order to recalculate some totals.

ie: quantity * db lookup value = total.

My problem is, I need a way to call that Javascript function AFTER changing the selected index of the ComboBox (and therefore after the postback) I'm trying to avoid duplicating the javascript code in the selected index changed in the code behind. Far better if I could just call the Javascript function after the postback required for that lookup and only when that lookup dropdown is changed.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 25 Jul 2012, 12:21 PM
Hi Brock,

Let me suggest you try handling the server-side SelectedIndexChanged event.

Regards,
Kalina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
ComboBox
Asked by
Brock
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or