Hi Gaudalupe,
Thanks for contacting Syncfusion support.
Query : I want do events with selected elements, I'm using checkbox:
From the given details we suspect that you are using template column to display the checkbox and you want bind the click event for the checkbox. Your achievement can be achieved using the templateRefresh event of Grid. We have achieved your requirement in the below code example.
<div>
<ej:Grid ID="FlatGrid" runat="server" AllowSorting="True" AllowPaging="True" IsResponsive="true">
<Columns>
<ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" TextAlign="Right" Width="75" />
<ej:Column Field="CustomerID" HeaderText="Customer ID" Width="80" />
<ej:Column Field="EmployeeID" HeaderText="Employee ID" TextAlign="Right" Width="75" Priority="4" />
<ej:Column Field="Freight" HeaderText="Freight" TextAlign="Right" Width="75" Format="{0:C}" Priority="3" />
<ej:Column Field="OrderDate" HeaderText="Order Date" TextAlign="Right" Width="80" Format="{0:MM/dd/yyyy}" Priority="2" />
<ej:Column HeaderText="CheckBox" Template="#columnTemplate" TextAlign="Center" Width="110" />
</Columns>
<ClientSideEvents TemplateRefresh="templaterefresh" />
</ej:Grid>
</div>
<script type="text/x-jsrender" id="columnTemplate">
<input type="checkbox" id="check" />
</script>
<script type="text/javascript">
function templaterefresh(args) {
$(args.cell).find("#check").click(function (args) {
debugger;
})
}
</script> |
Refer our API documentation for your reference
If the above provided solution does not meet your requirement please share more details about your requirement.
Regards,
Vignesh Natarajan.