Skip to Content
author's profile photo Former Member
Former Member

want to disable one row in a table

Hi,

I have a requirement where I have to disable only one row of a table.

Also, I am not using any checkboxes/radiobuttons in the table.

Please help me in resolving this.

Thanking You.

Regards.

Reinuka.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Jun 01, 2010 at 03:48 AM

    Hi,

    In the Node which u have created in the context for binding to a table add one more attribute of type boolean and bind it to the "Readonly" property of the table cell editor.

    using the loop u can check for the condition and set the readonly attribute to true or false.

    TableNode

    ---A

    ---B

    ---C

    --TableRowReadOnly(boolean)

    for(int i = 0; i < wdContext.nodeTableNode().size(); i++)
    {
       if(condition)
       {
           wdContext().nodeTableNode().getTableNodeElementAt(i).setTableReadOnly(true);
       }
       else
       {
           wdContext().nodeTableNode().getTableNodeElementAt(i).setTableReadOnly(false);
       }
    }

    Hope this helps u

    Regards,

    Poojith MV

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      Create a Value Node in the below mentioed structure

      TableNode

      ---value1

      ---value2

      ---value3

      ---TableRowReadOnly(boolean)

      Note: - make sure that the attribute TableRowReadOnly is in the same level as the other attributes in the node

      Create an Action for the onLeadSelect event for the table and in that action, write the following code:

      int leadSelection = wdContext().node<nodename>().getLeadSelection();
      if(leadSelection != -1)
      {
      	for(int i = 0; i < wdContext.nodeTableNode().size(); i++)
      	{
         		if(condition)
         		{
            			 wdContext().nodeTableNode().getTableNodeElementAt(i).setTableReadOnly(true);
        		 }
        		else
         		{
             			wdContext().nodeTableNode().getTableNodeElementAt(i).setTableReadOnly(false);
         		}
      	}
      }

      Hope this helps u

      Regards,

      Poojith MV

  • author's profile photo Former Member
    Former Member
    Posted on Oct 28, 2010 at 04:56 AM

    Create one Boolean attribute in node and bind to read only property of the table cell editor.And in code u can make it as false or true.If u want to make one column as disable.Bind the attribute to only the particular column-table cell editor

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.