cancel
Showing results for 
Search instead for 
Did you mean: 

Change Table Datasource property dynamically

Former Member
0 Kudos

Hi,

I have created a simple view with a table control with initial binding to context node called "oldResults". Now I need to change the data source of this table dynamically on click of a button from one context node "oldResults" to another context node "newResults" (oldResults and newResults are two different context nodes with similar type in the same view).

How can I bind a new context node to an existing table which is already binded to another context node?

The reason is that on click of a button, I'm getting the results in newResults node.

Any help is of great help to me and thanks in advance for your time and help.

Thanks & Regards,

Shiva.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You could change the binding of the table from within method wdDoModifyView(). But if you change the data source of a table, you also have to change the bindings of all table cell editors because these must point to attributes inside the data source node (or subnodes of it).

Another possibility would be to use 2 tables that are exchanged dynamically using the "visible" property.

But: Why not simply exchange the data source node's element collection and not using different nodes at all?

Armin