on 11-21-2013 5:53 PM
Hi everybody,
I have a empty table which has been binded to context node(o..n cardilinality).
These empty rows may vary depending on some condition.
Now my requirement is whenever user given material no. in 1st cell(matrix position is 1*1) and
press enter on that cell then first row of that table should be filled with all material information.
If user given mat.no.in positioned (2*1) cell and press enter on that cell then entire 2nd row should be
filled wid all that mat inf....
Thanks in advance....
1. Set the cardinality of the table as 1.. N. So by default a row is available.
2. Create a tool button to add rows or material
3. In the table only column material is input field and editable.
4. Set an action for event onEnter of the column material inp field
5. In the event call the model and pass number typed by user. Based on positive result get the reference to the existing element and set the rest of the values of the element.
Note: to make use of wdcontext.nodexxxx.currentcontextelement method, you need to set the ui table mode property as auto. But it set the editing row as selected row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agree to Jun Wu.
Create one Empty Element and use OnEnter/OnChange Event for Business Logic.
OR
Create Add button in toolbar to add this empty element everytime for new material.
Thanks,
Amey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I found this to work, but it needs your Row to be Selected.
If you row is selected, then the following code works,
wdContext.nodeMaterial().currentMaterialElement().setMaterialName("NoteBook");
We can create a onEnter event on the Material ID cell.
However, the problem peersists that the row has to be selected, otherwise it may update wrong data. It only updates the currently selected row.
Nice question.
Please, also, post the solution if you already have it.
Thanks and Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Same can be implemented without selecting the row also.
For this we have to use the Parameter Mapping. Add 1 parameter ot type IWDNodeElement in the Action and Event Handler of OnEnter/OnChange event of the input field.
After this right click on Input Field and select Paramter Mapping. Map the nodeElement to new attribute.
In the code use nodeElement.setMaterialName("NoteBook"); instead of wdContext.nodeMaterial().currentMaterialElement().setMaterialName("NoteBook");
Regards,
Amol
create some empty element in the context
in the onenter event handler of the input field, you can write your logic to load the data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Set the cardinality of the table as 1.. N. So by default a row is available.
2. Create a tool button to add rows or material
3. In the table only column material is input field and editable.
4. Set an action for event onEnter of the column material inp field
5. In the event call the model and pass number typed by user. Based on positive result get the reference to the existing element and set the rest of the values of the element.
Note: to make use of wdcontext.nodexxxx.currentcontextelement method, you need to set the ui table mode property as auto. But it set the editing row as selected row.
Message was edited by: Sharath M G
User | Count |
---|---|
88 | |
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.