cancel
Showing results for 
Search instead for 
Did you mean: 

problems in updation

Former Member
0 Kudos

hi,

I have a problem related to read only property,

i have multiple records in which some columns of a 1st row needs to be updated and some not.

While in 2nd record the same column which needs to be updated in 1st row needs to be read only .

Is this possible if yes , pz. help me out

with regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shubham,

Thanks for ur valuable help...but i am still tied up...

Problem :

I have populated a table . Say it has 10 rows.

Now I want some columns to be read-only for a particular

condition, i.e say for first row the column A should be editable but for 2nd row same column field should appear read only.

I tried what u suggested but what happens is that----

when the conditions match it makes all the column read only for all nodes.

Waiting for ur reply,

Regards

Arun

Former Member
0 Kudos

Please post your exact context structure and the implementation of the calculated attribute.

Armin

Former Member
0 Kudos

Hi Arun,

You need to add the extra value attribute to the same node. So after adding the field to the structure I showed it will look like

OrderItem

|-Item No

|-Item Description

|-Item Cost

|-Item Cost Read Only

So this will be calculated for each row of the table using the Item Cost value of that row.

Regards,

Shubham

Former Member
0 Kudos

Hi Shubham,

I am exactly doing the same way as u guided,

but unable to get result .

Can u help me with the changes in properties of the value node and value attribute along with the code snippet of setter and getter method if possible.

With Regards

Arun

Former Member
0 Kudos

Hi Arun,

Please send me the code of your getter

Regards,

Shubham

Former Member
0 Kudos

Dear Shubham,

<b>CODE INSIDE THE GETTER METHOD</b>

public boolean getSubbegSubbegdatereadonly(IPrivateBulkUpdationOfOrders.ISubbegElement element)

{

String bzirk = null;

bzirk = wdContext.nodeListorders().

currentListordersElement().getBzirk();

int z = 1;

z = bzirk.compareTo("STORE");

if (z == 0) {

return false;

} else {

return true;

}

}

<b>CONTEXT</b>

In Context I have declared a node with name SubBeg

and 2 value attribute in this node---

Subbegdate( type date) and

Subbegdatereadonly ( type boolean).

In the code I check the value of "Bzirk" which is a model attribue , on its basis i have to make this field(Subscription Begin date "Subbegda") readonly.

With regards,

Arun.

Former Member
0 Kudos

Hi Arun,

I am not sure if you are understanding me correctly.

Let me explain again.

1) You have a table of Order List with 10 orders and each order rows each having 10 columns.

2) Now you want to set some columns in every row read only depending on the value of a field in the same row

3) So you declare a column 11 in your Order List Table as type boolean and Calculated and do all the above.

So now in your case either you have third column Bzirk in your node SubBeg. This is becuase you want to set the Read Only according to the value for Bzirk in that row.

4) In the getter method should do something like this.

public boolean getSubbegSubbegdatereadonly(IPrivateBulkUpdationOfOrders.ISubbegElement element)

{

String bzirk = null;

bzirk = element().getBzirk();

int z = 1;

z = bzirk.compareTo("STORE");

if (z == 0) {

return false;

} else {

return true;

}

}

Hope you understand this now.

Regards,

Shubham

Former Member
0 Kudos

Hi Shubham,

The problem has been solved .

Lots of thanks to u for guiding .

I am not bieng able to see the the grades so as to award points.

One query regaring from whr u belong.

R u from Ranchi.

With Regards

Arun

Former Member
0 Kudos

Hi Shubham,

Thanx alot for guiding in solving the above problem.

I hav another problem as stated:

I have multiple records in a table.

one of the column is DropDownByIndex .

Conside 1st row of a table

I select one value say"A" by using DropDownByIndex.

Conside 2st row of a table

I select one value say"B" by using DropDownByIndex.

Now as soon as i select "B" first row also reflect "B" whereas it should reflect "A".

With Regards

Arun

Former Member
0 Kudos

Hi Arun,

Thats good to know.

I think you have awarded points to Kamlesh's reply and not to my reply.

Regards,

Shubham

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arun,

For all the columns that you want always to be Read Only, you should choose the table column editor as TextView.

For the columns that you want to be Read Only depending on some conditions do the following.

Say you have a value Node of OrderItems.

OrderItem

|-Item No

|-Item Description

|-Item Cost

Now say you want Item Cost Read Only depending on some conditions. So declare a value attribute in this same node say ItemCostReadOnly of type Boolean. Change the Calculated property of this attribute to true. This will create two functions in your implementation. Now in the "Getter" method, set return true or false depending if the item cost in a particular row is read only or not.

Map the Item Cost read only property to this new value attribute.

Hope this helps. Do let me know if you have any further questions.

Regards,

Shubham