lundi 1 février 2016

Calling selected checbox method inside a datagrid wpf

I have a data grid which one of the item in the item source is a bool variable.

the datagrid translate the bool into a checkbox.

I want to know how to add the event checkbox click. on the checkbox inside the data grid?

here is my code:

    public class FilterMcode
    {

        private bool cb;

        public bool Cb
        {
            get { return cb; }
            set { cb = value; }
        }
        private string mcode;

        public string Mcode
        {
            get { return mcode; }
            set { mcode = value; }
        }



        private string structureName;

        public string StructureName
        {
            get { return structureName; }
            set { structureName = value; }
        }

        public FilterMcode()
        {
            cb = true;
            structureName = "";
            mcode = "";


        }
    }

  public class Main ()
{
private  List<FilterMcode> _qf;

update void updateDataGrid()
{
        DataGridCommands.ItemsSource = _qf;
        DataGridCommands.Items.Refresh();

// calling check box click????
}
}




Aucun commentaire:

Enregistrer un commentaire