I made an treeview that's receive many datas, and i made that when the user clicks in the node thats haves the certain atribute category, they put in variable the value of the node. Like this:
function
onNodeClicking(sender, args)
{
// Verifica se a categoria do n¢ ‚ igual a '3'. Se for Pega o Valor dele
if(args.get_node().get_category() == "Categoria 3")
{
var valor = args.get_node().get_value();
}
}
this in the jscript, but i need when the user clicks in this and get this value, an gridview that is inside "radTabStrip" and only this gridview, get the services that has that value. The treeview can not do an postback, only the gridview can do this.But i try and try to do this and nothing :(.Have any way to do this, get the value of a node and async triggers an gridview whitout the postback, or without an treeview postback?
Thanks,
7 Answers, 1 is accepted

:P
The treeview should somehow trigger postback or ajax in order to update the grid. Maybe you can use RadAjaxManager and add a setting with initiator the manager and updated control - the grid. Then use the ajaxRequest client-side method from the nodeClicking event to initiate the ajax request. On the server side use the AjaxRequest event of the AjaxManager to update the grid. Here is a short example:
ASPX:
<telerik:RadAjaxManager
ID="RadAjaxManager1"
runat="server"
OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="GridView1"></telerik:AjaxUpdatedControl>
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<script type="text/javascript">
function onNodeClicking(sender, args)
{
// Verifica se a categoria do n¢ ‚ igual a '3'. Se for Pega o Valor dele
if(args.get_node().get_category() == "Categoria 3")
{
var valor = args.get_node().get_value();
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest(valor);
}
}
</script>
Codebehid:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
{
string nodeValue = e.Argument; //The node value passed from the client-side when calling the ajaxRequest method
//Data bind the grid here
}
I hope this helps,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

In this function:
function
onNodeClicking(sender, args)
{
// Verifica se a categoria do n½ ‚ igual a '3'. Se for Pega o Valor dele
if(args.get_node().get_category() == "Categoria 3")
{
var valor = args.get_node().get_value();
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.AjaxRequest(valor);
}
}
I get an error script in this line-
ajaxManager.AjaxRequest(valor);
so i make an text bot thats prints the ajaxManager and i the text box prints "null", so i think what happens?maybe he dont found de ajaxManager, What can be this?
The radAjaxManager is in my master page, its fine?
tks,
Could you please check if your RadAjaxManager is properly rendered in your page? Look for something like this:
$create(Telerik.Web.UI.RadAjaxManager
The last parameters of the $create routine should look like this:
$get("SomeValue")
where "SomeValue" is the correct ID of your RadAjaxManager which you can later use in $find().
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

var
ajaxManager = $find("ctl00_RadAjaxManager1");
why the control have this name "ctl00_RadAjaxManager1" and why i cant get whith "$find("<%= RadAjaxManager1.ClientID %>");"?
Controls from master pages receive a default prefix "ctl00". You can find more info in this blog post.
Are you using the <%= RadAjaxManager1.ClientID %> in your content page? If yes - it is likely it won't work. You can try this as a workaround:
<%= Maser.FindControl("RadAjaxManager1").ClientID %>
Regards,
Albert
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

And many thanks for the link!