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. Image for the cookie policy date
close icon

CallbackPanel and visible property

Hi,

I have a web page with many fields and two callbackPanels. The fields outside the callbackPanels when selected activates the first CallbackPanel1 refresh event.

- The first callbackPanel1 has a gridview with template field with hyperlinkfield inside. The template field when clicked by the user activates the CallbackPanel2_refresh event for the second CallBackPanel.

What I would like to happen is the CallbackPanel2 is visible only when the Hyperlink field is clicked (this field calls the javascript function getGridSelectedIndex(11) as shown below).

I am making the callbackPanel2.visible = false in the page_load inside the !postback statement.

Here is the javascript function that I am using to make the callbackPanel visible.

function getGridSelectedIndex(param)
{
document.getElementById('CallbackPanel2').style.visibility='visible';
__sfCallbackPanel2.callback(param);
}

But this gives me error: Microsoft JScript runtime error: Object required.

if I change the code to:
function getGridSelectedIndex(param)
{
__sfCallbackPanel2.callback(param);
}

I get this error:
Microsoft JScript runtime error: '__sfCallbackPanel2' is undefined.

Any help would be great!!


7 Replies

RM Rekha Mallavarapu April 12, 2007 03:17 PM UTC

Any suggestions?

Rekha




GB Gokul B Syncfusion Team April 13, 2007 01:07 AM UTC

Hi Rekha,

We can able to reproduce the issue as in attached image. we noticed that invoking the callback refresh event from the other callback panel throws Javascript error. Could you please update us "Is this the one you are mentioning?".

CallbackPanelIssue.zip

we have attached a image file to double check the issue.

Let us know if you have any other queries.

Thanks for using Syncfusion products.

Regards,
Gokulkumar B


RM Rekha Mallavarapu April 16, 2007 02:14 PM UTC

Hi Gokulkumar,

I created a sample program that reflects little piece of what I am doing. I am getting the same error in my application as this sample.

- in the page_load event, I have to hide the CallBackPanel2.visible = false.

- When the hyperlink is clicked, the CallbackPanel2 should be made visible not earlier.

I tried to unhide in the javascript, I get an error, object required. If I do it in the CallBackPanel2_refresh event, I get the CallBackPanel2 undefined error.

Hope this will give you a good example to help me resolve this issue.

Thanks,

Rekha

Test84.zip


GB Gokul B Syncfusion Team April 17, 2007 10:07 PM UTC

Hi Rekha,

Attached is your modified sample in which the Panel and CallbackMultiplexer is used to resolve this issue.

http://websamples.syncfusion.com/samples/Tools.Web/4.4.0.51/F59365/Callback_Forum59365/main.htm

* In our sample we have placed TextBox and Button inside the Panel, which is invisible, in the Second Callbackpanel
* We have used the Callbackmultiplexer to refresh the second Callbackpanel which makes the panel visible when the hyperlink is clicked.

Let us know if you need any other assistance.

Regards,
Gokulkumar B


RM Rekha Mallavarapu April 18, 2007 07:07 PM UTC

Hi Gokulkumar,

Thanks for your quick response.

I used what you suggested. But when I added a GridGrouping control, I am getting the following error:

Microsoft JScript runtime error: 'BeforeCallbackResponse' is null or not an object

Please see the attached sample.

Any suggestions would be great!!

Thanks!

TestPNPA.zip


RM Rekha Mallavarapu April 18, 2007 07:25 PM UTC

Hi Gokulkumar,

ignore the previous message I added..

When I added the panel and also a gridgrouping control inside the panel and used CallbackMultiplexer. I am getting this error:

Microsoft JScript runtime error: 'EssentialGridObject' is undefined

Attached is the source.

Any help would be great!!

Rekha

Test85.zip


GB Gokul B Syncfusion Team April 18, 2007 09:02 PM UTC

Hi Rekha,

Thanks for your update.

We noticed that when the GridGroupingControl is made visible(i.e panel is made visible in your scenario) on callback throws the "EssentialGridObject" is undefined error. It seems to a bug. Could you please open a new Direct-trac incident with "Forum id - Forum Subject" as subject line to proceeds towards the bug fix.

Let us know if you have any other queries.

Regards,
Gokulkumar B

Loader.
Live Chat Icon For mobile
Up arrow icon