A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] AS3 DataGrid with CheckBox Renderer Update issues

  1. #1
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378

    resolved [RESOLVED] AS3 DataGrid with CheckBox Renderer Update issues

    I'm creating Datagrid dynamically and giving each row's first column a custom checkbox cellrenderer as noted here: http://kirill-poletaev.blogspot.com/...t-part-13.html. I have added an ITEM_CLICK event listener to the datagrid as such:

    Code:
    datagrid.addEventListener(ListEvent.ITEM_CLICK, ToggleCheckBox);
    However, for the life of me I cannot figure out A) how to target the CheckBox specifically, B) how to toggle its' selected value, and C) how to finally update the datagrid view to reflect the toggled option.

    Code:
    private function ToggleCheckBox(e:ListEvent) {
         // do some magic
    }

    Anyone care to throw me a bone?
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,378
    Most of issues were resolved because I was storing the dataprovider in a new variable:
    Code:
    var dp:DataProvider = myDataGrid.dataProvider; // This is by value! Not by reference!
    After doing updates to the dataprovider, it is necessary to reassign the grids dp in order for it to reflect the changes:
    Code:
    myDataGrid.dataProvider = dp;
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center