0 Replies Latest reply on Jun 19, 2007 11:45 AM by ajaxfan

    datagrid multipleSelection

    ajaxfan Level 1
      Hi,

      I am trying to set the multipleSelection flag to true in the FABridge example. I couldn't set it as it says there is no function available. It would be great if anyone helps me understand why it is failing. Below is the code...

      Thanks,
      AjaxFan.

      var flexApp = FABridge.example.root();

      var grid = FABridge.example.create("mx.controls.DataGrid");
      var col1 = FABridge.example.create("mx.controls.dataGridClasses.DataGridColumn");
      col1.setDataField("apples");
      var col2 = FABridge.example.create("mx.controls.dataGridClasses.DataGridColumn");
      col2.setDataField("oranges");
      grid.setColumns( [col1, col2] );
      grid.setWidth(300);

      grid.setMultipleSelection(true); //throws error

      grid.setDataProvider( [ { apples: 12, oranges: 32 }, { apples: 7, oranges: 47 }, { apples: 14, oranges:21 } ] );
      flexApp.getPanel().addChild(grid);
      grid.addEventListener("change", function(event) { trace("apples: " + event.getTarget().getMultipleSelection); } );