We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Callback multiplexer and passing args to callback panels

Thread ID:

Created:

Updated:

Platform:

Replies:

72327 Mar 13,2008 08:02 PM Apr 1,2008 07:13 AM ASP.NET Web Forms (Classic) 2
loading
Tags: Tools
Ivan
Asked On March 13, 2008 08:02 PM

Hello,

So far, we have been using client side Javascript to call a callback panel. For. _sfCallbackPanel1.callback('action:save');
_sfCallbackPanel2.callback('action:display');

Now I want to use the mutiplexer to call these two panels.
_sfCallbackMultiplexer1.callback('bothpanels');

In the code behind event for the multiplexer, how would I pass arguments to panel1 ("action:save") and for panel2 ("action:display") ?

Thanks.


Ivan
Replied On March 14, 2008 05:00 PM

Just to clarify further, I am looking to use the multiplexer to call other callback panels that also takes arguments. How would I accomplish this? There isn't documentation on your web site for it.


Administrator [Syncfusion]
Replied On April 1, 2008 07:13 AM

Hi Ivan,

Thanks for posting your query to us.

You can call the callback panel in the callback multiplexer event as mentioned in the code below:


protected void CallbackMultiplexer1_Callback(object sender, Syncfusion.Web.UI.WebControls.Shared.CallbackEventArgs e)
{
char[] splitter = {':'};
string[] arr = e.CallbackArgument.Split(splitter);
Callbackpan1(arr[0], arr[2]);
Callbackpan2(arr[1], arr[2]);
}
public void Callbackpan1(string save,string val)
{
int eval = Convert.ToInt32(val);
switch (save)
{
case "save":
CallbackPanel1.BackColor = GetRandomBackColor();
CallbackMultiplexer1.ControlsToRefresh.Add(CallbackPanel1);
break;
case "any":
this.lbl1.Text = "any";
break;
}
}
public void Callbackpan2(string view, string val)
{
int eval = Convert.ToInt32(val);
switch (view)
{
case "view":
CallbackPanel2.BackColor = GetRandomBackColor();

CallbackMultiplexer1.ControlsToRefresh.Add(CallbackPanel2);
break;
case "any":
this.lbl1.Text = "any";
break;
}
}



Please refer the sample in the link below which illustrates the above:

http://websamples.syncfusion.com/samples/Tools.Web/6.1.0.34/I42307_N_W/main.htm

Please try running the above sample and let me know if this helps.

Regards,
Janagan.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;