1 Reply Latest reply on Aug 6, 2009 7:03 AM by Gregory Lafrance

    How to bind checkbox itemrender in a datagrid with selecteditem property?

    kage0002

      Hey,

      I have a datagrid with one checkbox column. I need the checkboxes to select different items that I want to delete for example or do something else with them. I was thinking of  binding the checkboxes with the datagrid.selectedItems property  but I don´t know how? Is there maybe a better way how to collect items from a datagrid that are selected by a checkbox ItemRenderer?

      Thanks!

      Regards Kat

        • 1. Re: How to bind checkbox itemrender in a datagrid with selecteditem property?
          Gregory Lafrance Level 6

          In this type of situation you should always be going to the DataGrid dataprovider to see what checkboxes are checked.

           

          So if the dataprovider for the DG does not have a field for the checkbox state, it is best to add one.

           

          Then simply modify the dataprovider field for the row checjbox that is checked/uncheced, and if you need to do something else based on what checkboxes are checked, refer to the fields in the dataprovider.

           

          That is always the best practice.

           

          If this post answers your question or helps, please mark it as such.