glennkerr
asked on
Which checkbox was checked in a web DataGrid?
I have a webpage that shows a company's aircraft (what types of Aircraft they have).
I have a datalist, that displays Aircraft Categories.
Inside that, is a datagrid, that displays a checkbox, and an Aircraft Type on each row.
It's all nicely bound, and shows the checkbox checked/not checked when appropriate.
I'd like to respond to the checkbox's OnCheckedChanged event to either add or delete a row in the underlying table as the user checks or unchecks the checkbox.
Here's the sub...
Public Sub chkType_CheckedChanged(ByV al sender As Object, ByVal e As System.EventArgs) Handles chkType.CheckedChanged
End Sub
But how do I know which row in the datagrid was checked/unchecked?
I have a datalist, that displays Aircraft Categories.
Inside that, is a datagrid, that displays a checkbox, and an Aircraft Type on each row.
It's all nicely bound, and shows the checkbox checked/not checked when appropriate.
I'd like to respond to the checkbox's OnCheckedChanged event to either add or delete a row in the underlying table as the user checks or unchecks the checkbox.
Here's the sub...
Public Sub chkType_CheckedChanged(ByV
End Sub
But how do I know which row in the datagrid was checked/unchecked?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Public Sub chkType_CheckedChanged(ByV
'sender.parent is cell, and it's parent is the DataGridItem
Dim dgi As System.Web.UI.WebControls.
Dim lblTypeID As System.Web.UI.WebControls.
End Sub
Moderator: Request refund, as I answered my own question.
(unless anybody else has anything good to add?)