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.
Syncfusion Feedback

Serverside Events are not firing for TreeGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

131518 Jul 14,2017 11:44 AM UTC Jul 19,2017 12:52 PM UTC ASP.NET Web Forms 4
loading
Tags: TreeGrid
Kadam, Suresh B. (WTIC 535) CWR
Asked On July 14, 2017 11:44 AM UTC

Hi Team,
I have attached a handler to server side event OnServerRowSelected. But the event is not firing. Do I need to set any property to make the event triggered.

Thanks,
Suresh.

Kadam, Suresh B. (WTIC 535) CWR
Replied On July 17, 2017 06:37 AM UTC

Hi Team,

I even tried client side event RowSelected. It is also not firing. Please help me. I have configured the grid as it is given in the online samples.

http://asp.syncfusion.com/demos/web/treegrid/events.aspx

Your quick response will be highly appreciated.

Thanks,

Suresh.



Jayakumar Duraisamy [Syncfusion]
Replied On July 17, 2017 02:54 PM UTC

Hi Suresh, 
We have analyzed reported issue in our sample but unable to reproduce it, please make sure that the ej.web.all.min & ej.web.form.min script files are referred properly in your project. 
And check rowSelected event handler function is added in proper script block. 
Hence, we have prepared a sample with working of both client & server side row selected event but we would like to suggest you that use client side row selected events because it is properly works in all the aspects. 
[aspx] 
<ej:TreeGrid ID="Treegrid" RowSelected="rowSelected" // Client side event  
//.. 
<%--  OnServerRowSelected="TreeGrid_ServerRowSelected" --%> 
 
Please find the sample location as below, 
Please let us know, if you require any other assistance. 
Regards, 
Jayakumar D 


Kadam, Suresh B. (WTIC 535) CWR
Replied On July 18, 2017 08:38 AM UTC

Hi JayaKumar,

You are right. ej.web.form.min script was missing in our project. Adding this resolved the issue. Thank you.

Is there any example for TreeGrid reading data in the OnServerRowSelected event.

Regards,

Suresh Kadam.


Jayakumar Duraisamy [Syncfusion]
Replied On July 19, 2017 12:52 PM UTC

Hi Suresh, 
Please find the response below. 
In OnServerRowSelected event will trigger with two arguments. The first argument has TreeGrid model and second argument have the selected record and index value. 
Please refer following code snippet, 
<ej:TreeGrid ID="Treegrid" OnServerRowSelected="TreeGrid_ServerRowSelected" 
//…  
protected void TreeGrid_ServerRowSelected(object model, TreeGridEventArgs eve) 
        { 
            //model have API with updated values 
            //eve have record index and selected record             
        } 
Note: In the model, we have only API values, we can’t get the record collections but client side rowSelected event we can get the updated record collections and other values. Later, we can pass it to the server side using Ajax post. 
We have also prepared a sample for your reference. Please find the sample location as below, 
Please let us know, if you require any other assistance. 
Regards, 
Jayakumar D 


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.

Warning Icon 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.Close Icon

;