0 Replies Latest reply on Oct 23, 2008 3:34 AM by smonika15

    datagrid having checkbox column getting resized at the time of reset

    smonika15
      Hi
      In my application, I have a data grid in which one column is having check boxes as itemRenderer.
      and there are two buttons in application one is "Clear all" and another is "Select all".
      when I reset the datagrid according to these buttons operation, it gets resized and scroll bar appears.
      It should not get resized.
      my data grid declaration is
      <mx:DataGrid id="dataGrid" name="dataGrid" dataProvider="{data.myData}"
      selectable="false"
      rowCount="{data.myData.length}"
      draggableColumns="false" width="{chart.width}" visible="{data.myData.length>0}" headerRelease="{dataTableEvents(event)}" creationComplete="{afterCreationComplete(event)}">
      <mx:columns>
      <mx:DataGridColumn id="numField" headerText="" dataField="numPosition" width="40" paddingLeft="10" paddingRight="10" sortable="false" />
      <mx:DataGridColumn id="checkBoxes" headerText="" dataField="checked" width="32" paddingLeft="10" paddingRight="10" sortable="false" >
      <mx:itemRenderer>
      <mx:Component>
      <mx:CheckBox click="{data.checked=!data.getChecked();}" selected="{data.checked}"/>
      </mx:Component>
      </mx:itemRenderer>
      </mx:DataGridColumn>

      </mx:columns>
      </mx:DataGrid>


      and reset grid code is
      public function resetGrid():void{

      for(var i:int =0; i<data.myData.length;i++){
      data.myData .checked = false;
      }
      }

      can anyone please help me?
      It is very urgent..
      Please reply as early as possible.
      Thanks in advance

      sm15