6 Replies Latest reply on Apr 16, 2007 4:37 AM by artoix

    hide datagridcolumn

      I am trying to hide a datagridcolumn. I set the visible=false but when i call my web service and the grid is populated, the column is shown. Any ideas on how to fix this? Also, maybe there is another way to do what I need. I would like to associate a key field from the data provider without showing it. Then, when I click on that row, I use that key to populate data in another grid. Hiding the column is the only way I can think of doing this. Any suggestions???

      Thanks -Greg
        • 1. Re: hide datagridcolumn
          phi2265 Level 1
          multiple data grids?

          thats kind of cheating, but it seems like it might work if you cant figure anything else out.
          • 2. Re: hide datagridcolumn
            jrpruitt Level 1

            There is nothing that says you have to define all the columns that the data source is sending. If you don't define a column for that particular data, there won't be any column to show it in, but you can still access the data as if it is there.
            • 3. Re: hide datagridcolumn
              ur_dtrain Level 1
              By pre-defining the columns, you can limit to view to whatever data you want to show. And as jrpruitt mentioned, the data object of each row/cell contains all data fields visible or not.
              • 4. Re: hide datagridcolumn
                Is there a particular reason why the datagridcolumn sometimes does not work?

                I'm just curious.

                My app has a form state and a datagrid state for requesting, displaying data. But depending on the kind of data requested in the app, the datagrid will sometimes show a column and sometimes not, so I tried binding the visible value of the datacolumn to a boolean variable.

                It works fine the first time the state changes from form to datagrid. However, when I change state back to the form, all successive state changes from form to datagrid go wacky. Sometimes the symbol column pops up. Other times the datagrid seems to be rendering incorrectly, with the column labels all askew in relation to the actual column borders.

                Anyone had any experience with or knowledge about this?

                I've worked around it but just defining different states with the appropriate setup of columns, but it just seems strange not to just use the datagridcolumn visible property.

                • 5. Re: hide datagridcolumn
                  dishmael Level 1
                  I'm having the same problem. I've setup the datagridcolumn property visible=false with the intention of having a button or checkbox to view the hidden columns. The column is hidden until the data changes. Is that a bug? As it is, I'm guessing the only real way to correct this is to remove/add the datagridcolumns via scripting. Does anyone else have a better way??
                  • 6. Re: hide datagridcolumn
                    artoix Level 1
                    yep. Having the same problem and using the same solution: loading and showing only needed data and loading and adding columns data on request. Though much more convenient would be loading all data and showing/hiding columns on request.
                    Would be interested to see any comments from Adobe support, whether this is a bug or there is some solution.