views:

125

answers:

1

The page has already run its' initialise/load sequences etc but then catches an event. How can I then send value(s) from this event to the client.

That probably doesn't make much sense, hopefully this will clarify:

I have a grid (Telerik RadGrid) in a user control (A) and when the user selects a row in that grid, I want to update another user control (B) with the selection.

I have wired up an event so that user control B is notified of the newly selected value however setting say a textbox value in user control B server-side isn't rendering (I'm presuming because the grid selection is happening over AJAX and therefore user control B never re-renders?).

So, how can I either force user control B to re-render with the updated values or how can I send these values to the client using an AJAX like call? Or am I going about this the wrong way entirely. The core question really is how can I get data from user control A to user control B when the page isn't being posted back.

Thanks!

A: 

There are ways to push data from the server (one is called "long polling") but this does not apply here. Are you sure that your grid event fires and the event handler executes? If you are, and you update control (B) but the change does not appear, put control (B) or both into an asp:UpdatePanel and call the Update() method on it in the event handler after changing the value. This will trigger another Ajax postback that should refresh your control.

cdonner
sounds like the ticket - will give that a crack - thanks!! (And yes, the event handler does execute but the control doesn't update itself)
Dave
Genius! That works a treat. Thanks a lot.
Dave
I'm glad it worked.
cdonner