jeudi 18 juin 2015

listview with checkbox get selected row index

here is my problem , i have a listview with checkbox , and i want to get the index of the row which is selected i want to get the index of the row to disable this row after validation

i try different method

CheckBox cbx = sender as CheckBox.tag;
    if (cbx != null) {
        var index = cbx.Tag.ToString();
    }
(((ContentPresenter)((CheckBox)sender).TemplatedParent)).IsEnabled = false; with this i disable just the checkbox 

CheckBox cbx = sender as CheckBox.tag;
int index = (int)(sender as CheckBox).Tag;




Aucun commentaire:

Enregistrer un commentaire