trigger onRecordDoubleClick on Hierarchical child grid

Hi,

I cannot trigger the onDoubleRecordClik evento on a child grid.

Is there a documented sample for doing that?

Best Regards

Claudio

3 Replies

VN Vignesh Natarajan Syncfusion Team October 16, 2017 02:53 PM UTC

Hi Claudio, 
 
Thanks for using Syncfusion products. 
 
As per your request, we have prepared a sample with RecordDoubleClick event on child Grid. We are not able to reproduce the reported issue. Please refer the below code snippet. 
 
                                                            .  
                                                            . 
 .ChildGrid(child => 
                     { 
                         child.Datasource("http://js.syncfusion.com/demos/ejServices/Wcf/Northwind.svc/Orders/") 
                            .QueryString("EmployeeID") 
                            .AllowPaging() 
                            .Columns(col => 
                            { 
                                col.Field("OrderID").HeaderText("OrderID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add(); 
                                col.Field("ShipCity").HeaderText("ShipCity").Width(100).Add(); 
                                col.Field("Freight").Width(120).Add(); 
                                col.Field("ShipName").Width(100).Add(); 
                            }).ClientSideEvents(e=>e.RecordDoubleClick("onRecordDoubleClick")); 
                     }) 
                                              .  
                                              . 
<script type="text/javascript"> 
    function onRecordDoubleClick(args){ 
    alert("recordDoubleclick event triggered for child grid ") 
} 
</script> 
 
 
Please refer the below screenshot for the output 
 
 
 
For your convenience we have prepared a sample which can be downloaded from below link 
 
 
Refer our online documentation for your reference 
 
 
So Kindly provide the following details to help you better. 
  1. Full Grid codes(cshtml and controller page)
  2. Script error in the console window(if any)
  3. Try to reproduce the reported issue in sample provided. 
 
 
Regards, 
Vignesh Natarajan. 
 
 



TH Thamir December 13, 2022 10:25 AM UTC

Hello,


Would this be possible on Angular?

I am trying to allow recordDoubleClick on angular where it triggers when clicking a record in a child grid.

Thanks

childGrid: GridModel = {
    dataSource: this.rowChildData,
    queryString: "pid",
    allowGrouping: true,
    groupSettings: this.groupOptions,
    recordDoubleClick: this.onRowClick(),
    columns: [
      {
        field: "pid",
        headerText: "P ID",
        textAlign: "Center",
        width: 120,
      },
      { field: "tech", headerText: "Technology", width: 120 },
      { field: "cellName", headerText: "Cell Name", width: 120 },
      { field: "siteType", headerText: "Site Type", width: 120 },
      { field: "activationStatus", headerText: "Activate Status", width: 120 },
    ],
  };




PS Pavithra Subramaniyam Syncfusion Team December 14, 2022 11:24 AM UTC

Hi Thamir,


You can achieve your requirement by assigning a function to the “recordDoubleClick” event instead of calling a function inside the Child Grid definition. Please refer to the below code example and sample for more information.


ngOnInit(): void {

  this.childGrid = {

    recordDoubleClick: this.onRowClick,

    .  .  .

  };

}

onRowClick(args: RecordDoubleClickEventArgs) {

  console.log(args);

}

 


Please get back to us if you need further assistance on this.


Regards,

Pavithra S


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Attachment: GridDblclick_cf0fb424.zip

Loader.
Up arrow icon