on 05-18-2006 11:09 AM
Hi all,
The following is my requirement.
I need to display values in my table on the view. But based on the Field content in one perticular column i need to make that entire row editable/in editable.
Say I have a column Status in my Table.
If the status field content for a given row is 'In progress' then that row should be made Editable and all other rows with status other than 'In Progress' should be made Ineditable.
Please Revert back ASAP.
Thanks
Sravan.
Hi Sravan,
In context node create attribute enabled (type boolean), set it to appropriate value depending on your status attribute after data load, bind attribute to enable proprty of your table columns.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
Thanks a lot for the reply. With the solution provided we can enable/disable different columns of the table. But my requirement is that, i should make certain rows enable/disabled based on content of one of the fields in that row. Certain columns should be enabled for certain rows and same columns might have to be disabled for other rows.
Please let me know if this is also possible.
Thanks in advance,
Sravan
Hi,
In my opinion, creating a single boolean attribute to your context and binding it to the tablecolumn editors won't work, because all your editors will then share the same attribute. Once you change it, all others will use this value.
Try using the wdDoModifyView() method and modifying the table rows dynamically.
Regards,
Satyajit.
No, do not use wdDoModifyView().
You could add a calculated boolean attribute "ReadOnly" under the data source node "Rows", and (assuming the table cell editor is an InputField) bind the "readOnly" property of the input field to this attribute.
In the generated getter for the calculated attribute, you would write something like
boolean getRowsReadOnly(IWDNodeElement element)
{
//@@begin ...
IRowsElement row = (IRowsElement) element;
return row.getState() != State.IN_PROGRESS;
//@@end
}
Armin
hi sravan
use a supply node function.
Try this procedure:
Create a node name --> EditNode and a value
attribute-->Edit of type boolean. Attach that to the Progress column edit.
Now in the supply function write something like this:
if(parentElement.getStatus().equals("In Progress))
node.setEdit(true);
I hope this helps
Thanks
Srikant
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.