on 11-03-2005 7:17 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.