Page 1 of 1

applyProperty to a grid textbox not in view

Posted: Fri Oct 13, 2017 9:39 am
by robhathome2
Hi

I have a 13 line grid with various textboxes, 2 of them containing a price and a number of cases. When either of these textboxes are changed, the onchange event fires, we add up the new totals, calc margins etc. and change the border of the textbox (to emphasize) so the user sees a visual confirmation that they have changed it. In addition, when the grid is initially displayed, we fire the summarising routine and it runs through every grid row (using getDataValue etc.), calculates everything and emphasizes either of the texboxes that have been changed from their original values (also shown on the grid). This emphasizing works great for the 13 rows on display but doesn't work for any row not displayed. Does anyone know if applyProperty doesn't work if the grid field is not in view? I have added an applyProperty(myfield, "field type", "textbox") just in case a re-rendering resolved it to no avail.

Thanks in anticipation.

Re: applyProperty to a grid textbox not in view

Posted: Fri Oct 13, 2017 10:10 am
by Scott Klement
It will not work wth boxes that have not yet been on the display (since the screen was sent from the program last). Profound UI does not create the HTML elements for grid rows until they are paged onto the screen... as such you will not be able to change their borders, since the elements do not yet exist.

After the user has paged them onto the screen, you can change them.

Re: applyProperty to a grid textbox not in view

Posted: Fri Oct 13, 2017 12:36 pm
by robhathome2
Thanks Scott - I'll change the way I'm doing it and set it before sending it to the grid.