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.

ClientSide Script in GGC is called twice

Thread ID:

Created:

Updated:

Platform:

Replies:

76902 Sep 29,2008 11:01 AM Oct 7,2008 01:55 PM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
Mr. Sascha Wald
Asked On September 29, 2008 11:01 AM

Hi there,

We are using AJAX-enabled websites and have some strange problems with the GGC and Clientside-Script.

What we want:
After selecting a row in the grid, details of the selection should be shown in other controls. For that, we use ClientSideOnSelectionChanged, call a javascript to start a partial postback.

The problem:
After selecting another row with a higher ID, the old selection stays in the selectedrecordscollection, so you have no chance to see serverside which row a customer selected.

I added an example with a detailed description about that. The example show also that it work with an asp-button!


Second problem: if you have the property ClientSideOnSelectionChanged set, you are no more able to sort the grid! Simply try it with the sample attached.

What am I doing wrong?





error_DoubleClientScriptCall_e8288edf.zip

Rajarajeswari S [Syncfusion]
Replied On October 7, 2008 01:55 PM

Hi Sascha,

Sorry for the delay in getting back to you.

If your intention is to access the details of the selected rows, it can be done through client side itself using the “ClientSideOnRecordClick” event.
Please refer the below code snippet which illustrates this:

Width="200" ClientSideOnRecordClick="GetID(this)" PostBackOnFocusedChanged="false">


function GetID(gridObj)
{
document.getElementById('TextBox1').innerText = gridObj.Row.GetValue('ID');
}

Please refer the sample from the below link, which illustrates the above:


http://www.syncfusion.com/support/user/uploads/Sample_52b45a4a.zip


Please let us know if this helps you out.

Regards,
Raji



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.

;