I have a perspective page with a table bound to a named query that returns a bit data type field, resulting in a checkbox.
I have an embedded page with a checkbox.
The table is set up with a rendered view to the embedded page with a checkbox.
How do I bind the checkbox data from the table to the checkbox on the embedded page, which is the rendered view?
I think you're mixing up some terminology here.
- Page - A collection of views that are displayed within a single tab of a browser during runtime. A page consists of at least one view (called a "primary view"), any number of additional views that can be docked along the edges (called "docked views"), and a partial URL associated with the page,
With all that out of the way, I think you are saying,
I have a Perspective view with a table bound to a named query that returns a boolean data type field, to be displayed as a checkbox.
I have an embedded view with a checkbox.
The table is set up with a rendered view to embed the view with a checkbox.
How do I bind the checkbox data from the table to the checkbox on the embedded view, which is the rendered view?
Is that correct?
If the above re-phrasing of your question is correct then there is no need for the embedded view. Instead configure the table props,
columns.n.render : boolean
columns.n.boolean : checkbox
(where n is the column number).
Your re-phrasing is likely correct. Its just that from the tree node seen in the attachment, it appears I am dealing with two pages within a view. The first page [Control] has a table bound to a SQL Query, which has a bit column resulting in a checkbox. The second page [Checkbox] is comprised of a single checkbox component, which is a rendered view on the bit column on [Control].
I am looking to bind the checkbox of the rendered view (the checkbox component) on [Checkbox] to the bit field from the SQL Query on [Control].
Its just that from the tree node seen in the attachment, it appears I am dealing with two pages within a view.
Those are views, not pages, despite the "Page" folder name. Pages are defined in the Page Configuration window.
page view [Control] has a table bound to a SQL Query, which has a bit boolean column resulting in a checkbox. [SQL doesn't render anything so it can't return a "checkbox" - only a boolean value which your view can render as a checkbox.] The second page view [Checkbox] is comprised of a single checkbox component, which is a rendered view on the bit boolean column on [Control].
I am looking to bind the checkbox of the rendered view (the checkbox component) on [Checkbox] to the
bit boolean field from the SQL Query on [Control].
I know, and as explained, it's much simpler than you are making it. The embedded view is not required. Let the table column render it as boolean and set the boolean display as checkbox.
Sorry for all the corrections which may appear pedantic, but words have precise meanings and you're going to struggle if you get them wrong (and we're going to struggle trying to decipher your posts).
Thanks Transistor. The problem with letting the table column render it as a boolean and display as a checkbox is that it takes two clicks (basically a double click) to change from checked to unchecked, or vice-versa, which is an absolutely undesirable, and ridiculous outcome (just my opinion). I was given an indication in my research that the double click could be eliminated with a rendered view, and so far, the rendered view on the boolean provides a single click (if I change the boolean column to not editable), only I do not know how to bind the boolean to the view [Checkbox].
With all the semantics covered, getting back to the original question that started this post, how do I bind the boolean in view [Control] to the view [Checkbox]?
The table's row data is passed to any embedded view. That means that you can bind the checkbox enabled propert to the view's row data. See how to use
view.params.value at the bottom of Table Column Configurations - Ignition User Manual 8.1 - Ignition Documentation .
I've seen a post on the forum about how to do the single-click on cell to toggle the checkbox. I'll report back when I find it.
Perfect. Thank you @Transistor . The binding between the two views is successful using the view.params.value and the Checkbox only requires a single click to change from checked to unchecked, and vice-versa.