hi,
i created a dataset in the application and a TableAdapter.this TableAdapter gets data from two tables of the dataBase and inner jioned them. one of the fields is named Active.TableAdapter just gets the data from the dataBase which their active fields =0.then i created a form and put a DevExpressDataGrid in it and bound the the TAbleAdapter to it.
i have a problem to sending the new value of a edited column of the devepressDataGrid to the TableAdapter.this datagrid has 4 coulmn which one of them is named as delete column ,which showes Active field. this column is defined as bit , that i can check some rows of that column.
i want when i check the delete coulmn of some rows , and then press the delete button ,that rows be deleted .
now i dont know how to send the boolean parameter to the tableAdapter. that when the delete column of the row is checked, Edit the Active feild of that row =1 and for the next time dont show them.
i know i should create an updateQuery for the tableAdapter an send the new value of ( Active )to it, but how? i tryed different codes but they didnt work.
one of the code i used:
Dim g As Boolean
Dim chkStatus As DevExpress.XtraEditors.CheckEdit = DirectCast(sender, DevExpress.XtraEditors.CheckEdit)
*Dim row As DataGridViewRow = DirectCast(chkStatus.NamingContainer, DataGridViewRow)
If chkStatus.Checked Then
g = True
Else
g = False
VIPAdmitTableAdapter.UpdateQuery(g)
bold line * has error: 'namingcontainer ' is not a member of 'DevExpress.XtraEditors.CheckEdit'
best regards