on 09-02-2008 12:32 PM
how to set Dropdown list in tablen whith others Dropdown values in each row of the table
hi ,
You have to add the parent element before adding data to the child node ...you follow the below steps it will work
1) Take ContextStructure as follows ...
tabledata (valuenode)
ddownbyindex( value node) --within the tabledata node
value (attribute)
2)Binding to your layout
tabledata (node) ---bind this to the dataSource property of your table
ddownbyindex( node)
Value (attribute)--bind to the texts property of you DDbyIndex
3)In wdinit() method add the following code
IPrivate<Your view name>.ITabledataElement tabledataElement =wdContext.createTabledataElement();
wdContext.nodeTabledata().addElement(tabledataElement);
for(int i=0;i<5;i++)
{
IPrivate<Your viewname>.IDdownbyindexElement ddbyindexElement=wdContext.createDdownbyindexElement();
ddbyindexElement.setValue("Value"+i);
wdContext.nodeDdownbyindex().addElement(ddbyindexElement);
}
And set the cardinality property of the table node as 0..n
and dropdownbyinex node to 1..n
You try it ...
Regards
Madhavi
Edited by: madhavi kotra on Sep 2, 2008 6:00 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You mean you want to have different drop-down entries for each row? If yes, you have to use the *ByIndex variant.
Example:
Rows (node, cardinality=0:n)
-- Entries (node, cardinality=0:n, selection=0:1, singleton=false (IMPORTANT!), supply function = supplyEntries)
---- text (string)
Implement supply function like:
void supplyEntries(IEntriesNode node, IRowsElement parentElement)
{
for (int i = 0; i < 3; ++i)
{
IEntriesElement e = node.createAndAddEntriesElement();
e.setText("This is item #" + i + " for row #" + parentElement.index());
}
}
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Follow the below steps
1) Take ContextStructure as follows ...
tabledata (node) ---bind this to the dataSource property of your ble
ddownbyindex( node) --child node of tabledata Node
Value (attribute)--bind to the texts property of you DDbyIndex
2)In wdinit() method add the following code
IPrivate<Your view name>.ITabledataElement tabledataElement =wdContext.createTabledataElement();
wdContext.nodeTabledata().addElement(tabledataElement);
for(int i=0;i<5;i++)
{
IPrivate<Your viewname>.IDdownbyindexElement ddbyindexElement=wdContext.createDdownbyindexElement();
ddbyindexElement.setValue("Value"+i);
wdContext.nodeDdownbyindex().addElement(ddbyindexElement);
}
And set the cardinality property of the table node as 0..n
and dropdownbyinex node to 1..n
You try it ...
Regards
Madhavi
Edited by: madhavi kotra on Sep 2, 2008 5:44 PM
Edited by: madhavi kotra on Sep 2, 2008 5:45 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
hav a look at these docs:[http://searchsap.techtarget.com/tip/0,289483,sid21_gci1238730,00.html]
using simple type:
[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/ded11778-0801-0010-258f-ac3b9408a194]
hpe it hlps u..
Regards
Khushboo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Welcome to SDN.
You need to have an attribute for the dropdown and this attribute must be inside the same node with which your table's dataSource property is mapped. Set the type of this attribute with a simpletype which will have all the values that you want to show in the dropdown.
Hope it helps.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use a supply function to populate child based on the parent selection.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
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.