This is probably a newbie question, and is perhaps more of a javascript general question than a Telerik specific one. However, I guess many Telerik-developers know the answer :-)
In many cases, we need to keep track of some kind of state in client:
var someState;
function SomeEventHandler() {
someState = someState + 1;
}
In the code-behind, we hook-up the event to some Telerik event:
theRadGrid.ClientSettings.ClientEvents.OnRowClick = "SomeEventHandler";
This works, if there is only one "theRadGrid" on the page, but if there are multiple instances of the control, we have problem, since "someState" is shared across instances, it is global to the page.
What is the best way to make state variables local to the instance?
Hope I made myself understood :-)
/Fredrik