2 Replies Latest reply on Feb 22, 2009 6:03 PM by alice_data

    Array Collection DataGrid Problem

    alice_data Level 1
      Hi,

      I thought this problem is solved, but it seems to me that the string is continuously being recreated, which causes a problem that I have to removeAll of my DataProvider whenever I check a checkBox. What I am hoping to accomplish here is to remove the checkBox, have the program search through which ones are unchecked, and remove only the "affected" elements without reconstructing.

      I used trace to track, and that is when I realized that the string is continuously being recreated, which is not what I want, because I am trying to allow users edit the dataGrid or other things on the screen as they go.

      Am I taking the wrong approach here?

      Alice
        • 1. Re: Array Collection DataGrid Problem
          Gregory Lafrance Level 6
          Not sure what you mean by "What I am hoping to accomplish here is to remove the checkBox, have the program search through which ones are unchecked, and remove only the "affected" elements without reconstructing.
          ".

          When does the checkbox get removed? After it is unchecked? Then if it is removed it can't then be checked again.

          Something else seems wrong with the code, as seen by the x out of y message, where y keeps growing.
          • 2. Array Collection DataGrid Problem
            alice_data Level 1
            Hi, Greg:

            No, what I mean is the stored array value of how many checkboxes are checked. Therefore, when a checkbox is unchecked, the existing stored value of the array removes the value of the unchecked checkbox. This is supposed to work with looping around the values of the checkboxes in both tabs.

            I would like to uncheck some of the checkboxes and populate what is modified and NOT recreating the entire array. I have successfully generated the dataGrid so that a user can uncheck and check checkboxes and have the correct output produced on the output, but it still seems that the array is still regenerated every time, so if I take the line myDataGrid.dataProvider.removeAll(); off from the select_array(), I would get an entire set of new database entries.

            Have I done something wrong here? I am hoping to only see what is "changed" be removed or added.
            Thanks for your help.

            Alice


            Alice