Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143586 | Aug 30,2005 02:39 PM UTC | Mar 28,2019 11:11 AM UTC | Angular - EJ 2 | 7 |
![]() |
Tags: Grid |
private void gridControl1_CurrentCellChanged(object sender, EventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; if(this.gridControl1[cc.RowIndex, cc.ColIndex].CellType == "CheckBox") { Console.WriteLine(this.gridControl1[cc.RowIndex, cc.ColIndex].CellValue); } }
<asp:UpdatePanel runat="server">
<ContentTemplate>
<script id="template" type="text/template">
<input type="checkbox" id="Verified{{:EmployeeID}}" name="Verified" onchange="myFunction(event)" class="e-field e-checkbox" style="width: 30px" />
</script>
<ej:Grid ID="EmployeesGrid" runat="server" AllowPaging="True" OnServerRecordClick="EmployeesGrid_ServerRecordClick">
<PageSettings PageSize="4"></PageSettings>
<ClientSideEvents ActionComplete="Complete" />
<Columns>
<ej:Column HeaderText="checkbox" Template="#template" TextAlign="Center" Width="110" />
……………………………………..
</Columns>
</ej:Grid>
<script>
var id, state;
function myFunction(event) {
id = $(event.target).attr("id");
state = $(event.target).prop("checked");
}
function Complete(args) {
setTimeout(function () {
$("#" + id).prop("checked", state);
},500)
}
</script>
</ContentTemplate>
</asp:UpdatePanel>
protected void EmployeesGrid_ServerRecordClick(object sender, GridEventArgs e)
{
// do your stuff here.
}
|
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.
This page will automatically be redirected to the sign-in page in 10 seconds.