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

Ajax Mngr with dynamic postback decision

1 Answer 63 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Neal
Top achievements
Rank 1
Neal asked on 12 May 2008, 01:10 PM
I need to be able to instruct / interact with Ajax mngr, such that based on a UserControl (say a boolean Property set into ViewState) I can force an Ajax Postback of an ajoining pane.

to clarify,..
I have a TreeView in the "TvwPane" and an adjacent pane, "DetailMaintPane" with a radGrid...AddNew and Edit facilities).
DetailMaintPane can sometimes change or add data (into Dbase) which affects the Nodes in the TreeView,..
(Node text changes or  New Nodes.)
I have created a boolean property and set it into viewstate.

The contents of The DetailMaintPane (originally a dozen or so forms), will be cut and pasted into usercontrols for ease of work/use  (nearly 7000 lines of c# code in the code behind of this form.)

For now,..I set a variable "blnUpdtTreeView"
which I need to interrogate to decide on whether or not to fire the postback event(refresh) on the treeviewpane
....
So,.. how to Use AjaxMngr to read variables from ViewState and depending on Value (True or False), force a postback on the treeview
I imagine it will need to call a function which may then use and instruct the Ajaxmngr ????

TIA
Neal

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 15 May 2008, 12:54 PM
Hello Neal,

The required functionality could be achieved by placing Hidden Input and keep the ViewState value in it (you could get the ViewState value server side and add it to the input). After that on the client side you could access the hidden input (document.getElementById("HiddenInputID")) and depending on its value, update the status of the TreeView. In order to ajaxify the TreeView just add it as updated control in the RadAjaxManager settings.

Let us know if further questions arise.

Kind regards,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
Neal
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or