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.

Tree Grid Row Selected

Thread ID:

Created:

Updated:

Platform:

Replies:

131458 Jul 11,2017 01:38 AM Jul 12,2017 01:59 PM ASP.NET Core 1
loading
Tags: TreeGrid
haryzad
Asked On July 11, 2017 01:38 AM

Hi Syncfusion Team

I'm using the treegrid to load the data from database as per below code, can you help me if want to capture the value when perform the row selected on the tree grid then set to the input / model / textboxfor

<ej-tree-grid id="TreeGridContainer" datasource="ViewBag.datasource" child-mapping="Children" tree-column-index="1"
                                  allow-filtering="true" allow-sorting="true" begin-edit="BeginEdit" is-responsive="true">
                        <e-tree-grid-columns>
                            <e-tree-grid-column field="DiagnosisPartCode" header-text="Diagnosis Code" allow-filtering="true" edit-type="String" width=45 />
                            <e-tree-grid-column field="Text" header-text="Diagnosis Name" edit-type="String" filter-edit-type="String" />
                        </e-tree-grid-columns>
                        <e-tree-grid-size-settings width="100%" height="350px" />
                        <e-tree-grid-edit-settings allow-deleting="true"
                                                   allow-adding="true"
                                                   allow-editing="true"
                                                   edit-mode="CellEditing" />
                    </ej-tree-grid>

Appreciate for your support.

Thanks

Jonesherine Stephen [Syncfusion]
Replied On July 12, 2017 01:59 PM

Hi Haryzad, 
Thanks for contacting Syncfusion support. 
By using “rowSelected” client side event we can perform any custom actions during row selection in TreeGrid. 
Please find the code example below: 
<ej-tree-grid id="TreeGridContainer" row-selected="rowSelected"></ej-tree-grid> 
 
<script type="text/javascript"> 
    function rowSelected(args) { 
        //Here we can perform any actions during row selection 
        alert(JSON.stringify(args.data.item)); 
   } 
</script> 
We have also prepared the sample based on this, please find the sample from below location. 
 
Regards, 
Jone sherine P S 


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.

;