mading multiple selection in advanced datagrid

Ask a Question related to Macromedia Flex General Discussion, Design and Development.

  1. #1

    Default mading multiple selection in advanced datagrid

    Hi All

    I'm new in Flex and AS3, so may be my problem is simple to solve but I need
    help anyway.

    I have to do the classic "Select All" button and apply it to an Advanced
    Datagrid.
    I have found in the help the "selectCell" method but when i try to use it in
    my code it doesn't appear.

    Someone can help me?
    Thanks in advance.

    Ivan

    fivan Guest

  2. Similar Questions and Discussions

    1. add row to advanced datagrid
      what is the code to add a new row to the advanced datagrid? when a button is pressed i want it to add the row
    2. Advanced Datagrid :-(
      Hi, Am working with AdvancedDataGrid Control. Requirement is something like need to show the whole year inventory in advanced datagrid. I can...
    3. Advanced OOP: Best OO design for rendering multiple page types to multiple devices
      Hoping to get some ideas from more experienced hands regarding the best way to use object-oriented design to assist my development of a content...
    4. multiple selection box
      Hi can anyone help me with a bit of code. I m trying to check on my form whether the user has made a selection from a multiple selection box? ...
    5. --- Multiple Selection, with Paging in the Datagrid ---
      Hi, Hard work but possible. You need to keep internal data (add fields to row data) on the server to track the selected rows. Natty Gur, CTO...
  3. #2

    Default Re: mading multiple selection in advanced datagrid

    hey.. use this property for ur Advanced datagrid..
    selectionMode="multipleRows"
    jdjivani Guest

  4. #3

    Default Re: mading multiple selection in advanced datagrid

    Ok, this property let the user select multiple rows.
    But is it possible to simulate the multiple selection of the user via
    scripting?
    Something that causes the same effects of the click of the mouse.

    fivan Guest

  5. #4

    Default Re: mading multiple selection in advanced datagrid

    use this kind of loop..

    private function initApp():void {
    application.addEventListener(KeyboardEvent.KEY_UP, keyHandler);
    }

    private function keyHandler(event:KeyboardEvent):void {
    var ctrlPressed:Boolean = event.ctrlKey;
    // If the user presses Ctrl + A, select all chart items.
    if (ctrlPressed) {
    var curKeyCode:int = event.keyCode;
    if (curKeyCode == 65) { // 65 is the keycode value for 'a'
    selectItems();
    }
    }

    private function selectItems():void {
    // Create an array of all the Grid's Row.
    var allSeries:Array =adgGrid.dataProvider.source;
    // Iterate over each Row.
    for (var i:int=0; i<allSeries.length; i++) {
    var selectedData:Array = [];

    // Iterate over the number of items in the series.
    for (var j:int=0; j<adgGrid.dataProvider.length; j++) {
    selectedData.push(j);
    }
    // Use the series' selectedIndices property to select all the
    //Grid items.
    allSeries[i].selectedIndices = selectedData;
    }
    }

    jdjivani Guest

  6. #5

    Default Re: mading multiple selection in advanced datagrid

    Bingo!

    It work perfectly.
    thank you very much!


    fivan Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139