How to disable event RowSelectingHandler for button in row of SfGrid?

 I have buttons "delete" in every row of SfGrid. When I click btn "delete" - I get RowSelectingHandler. But I want only  method Delete() for btn delete

       
       
           
           
           
           
           
           
               
           

       
   

1 Reply 1 reply marked as answer

JP Jeevakanth Palaniappan Syncfusion Team September 24, 2020 02:08 PM UTC

Hi Kostiantyn, 

Greetings from syncfusion support. 

We have validated your query and we suggest you to render the template inside a div with onclick stoppropagation as true. With this on clicking the delete button, it will stop the click events bound to the grid and only the template onclick event will be triggered. Please refer the below code snippet for your reference. 

<GridColumn HeaderText="Action"> 
    <Template> 
        <div @onclick:stopPropagation="true"> 
            <SfButton @onclick="DeleteHandler" Content="Delete"></SfButton> 
        </div> 
    </Template> 
</GridColumn> 

Please get back to us if you need further assistance. 

Regards, 
Jeevakanth SP. 


Marked as answer
Loader.
Up arrow icon