Please help me with this (simple I think) problem:
I have a Gridview with the first column edited with an RepositoryItemCheckEdit and with the datasource an runtime created datatable.
What I want to obtain and I not succeeded yet is to count the rows from the datatable with check on the first column and put the result in a label immediatelly after user changes check state of repository.
I'm using successfully FocusedRowChanged event but I want to obtain this result even I click in the same row of the changed check, or even after I just click on the RepositoryItemCheckEdit, without another click on another cell.
How could I obtain this result ?
Thank you very much !
I suggest you remove the FocusedRowChanged event handler and handle the RepositoryItemCheckEdit.CheckedChanged event in the following manner:
Private Sub repositoryItemCheckEdit1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) gridView1.PostEditor() CountChecked() End Sub
The PostEditor method posts the edited value to the underlying source. I've attached a sample demonstrating how it works. Please test it and let us know your result.