GridColHeader´s Visibleprop issue

Hi everyone,

I am developing a page layout with a RowTableArea where one of it columns I wanna hiding and showing according to my need. For this, I am using the property VisibleProp of the GridColumnHeader. When i set this variable name and save the page layout, this variable not appears in the adapter. I´ve already tried everything to make it appears, no success. Any ideas? I am using Software AG Designer 1.10, Natural One 8.4.1, Natural Engineer 8.3.2

Is there a bug or something in this property?

Hi Frederico,

property names must start with a lower case character. The reason is that NJX must follow Java and XML naming rules because the data binding is implemented in Java and XML.

You’ll see a small error message in the status bar of your Eclipse. See screenshot.

Best Regards,
Christine
Error.png

Hi Christine,

Thanks for your reply.

My bad, in my preview post I wrote "…When i set this variable name… " but I would mean "… When i set the value of this property, for instance visibleprop: w_visible_column … ". ( see figure 1 and 2)

The first character have been put in upper case just for highlight the properties and components from the rest of the words of my
preview post.

Anyway, when i save the layout page, no error is triggered and the w_visible_column does not appear in the adapter. ( see figure 3)

Any idea what could be?


I forgot the figure 3, here it goes.

Hi Frederico,

If you use visibleprop you need to add a propref for the gridcolheader as well.
Could you please try if specifying a propref solves the issue?

Thanks + Best Regards,
Christine

Hi Christine,

I specified the propref and the issue was solved, finally the variable appeared in my adapter, but in the other hand, another issue has happened, now the column is not hidden when i run my app.

I set w_visible_column to false in my code but at runtime the column is not hidden. Any idea?

Hi Frederico,

some hints what you can check:

Did you specify firstrowcolwidths=“true” in the rowtablearea2 control?
Did you specify a width for all your gridcolheader controls? If not, firstrowcolwidths=“true” will not be executed by the browser.

Have a look at the gridcolvisibility.xml layout of the NaturalAjaxDemos. To make hiding/showing columns work smoothly, only specify specific width for the gridcolheader and set firstrowcolwidths=“true”. The browser will render the grid just based on the column widths of the gridcolheaders. It will ignore the widths specified for the data in the repeat. The NJX framework controls the visibility via just controlling the visibility/width of the gridcolheader.

If this still does not help. Could you please attach the layout?

Thanks + Best Regards,
Christine

Hi Christine,

Thanks for your reply.

Yeap, I set firstrowcolwidths=“true” in the rowtablearea2 control and i set a integer value for all gridcolheader width, but still not solving my problem.

Fortunately, I had a look at the gridcolvisibility.xml as you previously mentioned and i compared it with my xml. I noticed the difference among them lay on the hdist(100%) after the last gridcolheader. That is the hack, we should place a hdist (100%) after all gridcolheaders. Issue solved at last !!! Thanks a lot for your help.