on 07-26-2006 7:44 AM
Hi everyone,
I create da dropdownlistbykey and its value is bound to a simple type I created in the dictionary.
I am not able to set the leading selection to position 1 which is the frst value defined in the disctionary.
Here is the details of the node :
node DataSource
value attribute A
value attribute B
value attribute Currency which is bound the the simple type
I want to display the first value defined in the simple type in Currency.
Should I create another node under DataSource especialy for Currency ?
Thanks for the help.
Regards.
Hi Fryda
Use the LeadSelection Property
Regards
Saravanan K
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
I have a Simple Type like below.
Values Description
1 -- One
2 -- Two
3 -- Three.
if(firstTime){
IWDDropDownByKey ddkey = (IWDDropDownByKey)view.getElement("DropDownByKey");
ddkey.setSelectedKey("2");
}
Drop Down List Box is giving Default Select as 'Two'.
Is this not the solution you are looking for?
Regards,
Sridhar
Hi Sridhar,
It is the solution I am looking for.
The problem is that it display the string "2" instead of the value defined in the dictionary.
In addition, it works only if you defined a value attribute at the root of the Context. But what happened if you defined a Node and a value attribute in it.
Thanks
Message was edited by: David Fryda
Hi,
Say your enumerated simple type is like this:
Value|Description
1 |Value1
2 |Value2
3 |Value3
Now if you say setSelectedKey("2"), the entry Value2 in your dropdown will be selected. Whatever you are entering as a parameter to setSelectedKey(), should be a key in the enumeration.
<i>But what happened if you defined a Node and a value attribute in it.</i>
What about this? I didn't understand. All you should be doing in this case is bind the selectedKey property to Node.nodeAttribute. Here is nodeAttribute is of type simpletype. Make sure the cardinality of the node is 1...1.
Regards,
Satyajit.
Hi David,
We can Set lead selection in wdDoModifyView method.
IWDDropDownByKey ddkey = (IWDDropDownByKey)view.getElement("DropDownByKey");
ddkey.setSelectedKey("3");
DropDownByKey - Drop DownBy Key Control Name
3 - Data Dictionary Value.
It will lead to Perticular Element.
Regards,
Sridhar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I don't think you can set the lead selection for a enumerated simple type.
It'll be better if you create a value node explicitly for Currency.
Regards,
Satyajit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.