on 05-15-2009 1:32 PM
Hi,
Iam able to add and delete rows from a table using the following code.
IPrivateFirst.ITabNode node1 = wdContext.nodeTab();
IPrivateFirst.ITabElement Element = node1.createTabElement();
node1.addElement(Element);
IPrivateFirst.ITabNode node1 = wdContext.nodeTab();
int i = node1.getLeadSelection();
node1.removeElement (node1.getElementAt(i));
The visiblerowcount for tab le is 5.readonly is set to false but Iam not able to view the rows.I can run the application and finf from table UI element (no of rows) that the row is getting added and deleted.I need to view the rows,select them etc.
Regards
Sharanya.R
Hi Sharanya,
Create actions and map them to button.
For example when you want to delete a record add a button to the view and create a action delete for it.
The delete action will be handled by a method onActionDelete paste the code for delete there:
IPrivateFirst.ITabNode node1 = wdContext.nodeTab();
int i = node1.getLeadSelection();
node1.removeElement (node1.getElementAt(i));
It will delete the lead selected node element.
Similarly create a button and action for create and add the code for create in the method:
IPrivateFirst.ITabNode node1 = wdContext.nodeTab();
IPrivateFirst.ITabElement Element = node1.createTabElement();
node1.addElement(Element);
Regards,
kartikaye
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To see something in the table, you have to
- bind the "dataSource" property to a context node
- bind the cell editor attribute(s) to attributes under the data source
- populate the data source node
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.