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

ClientSide Script in GGC is called twice

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

1 Reply

RS Rajarajeswari S Syncfusion Team October 7, 2008 05:55 PM UTC

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



Loader.
Live Chat Icon For mobile
Up arrow icon