|
|
Rank: Active Member
Joined: 7/20/2010 Posts: 13 Points: 39 Location: usa
|
How can we set the multiselectvalues in dropdown list.
Thanks
|
|
Rank: Active Member
Joined: 6/10/2009 Posts: 16 Points: 48 Location: Virginia
|
You can add items the same way you add items to a single select list. Just set 'MultiSelect' to 'true' on the control.
EntreeDrownList ddl = lGrp.AddFormItem<EntreeDropDownList>(p.Name); ddl.Name = "name"; ddl.MultiSelect = true; ddl.Items.Add("key","value");
|
|
Rank: Active Member
Joined: 7/20/2010 Posts: 13 Points: 39 Location: usa
|
I want to show the multiple selected items in dropdown.
I couldnt able to set the value of Multipleselectvalues property as this property is read only.
|
|
Rank: Active Member
Joined: 6/10/2009 Posts: 16 Points: 48 Location: Virginia
|
OK, I misunderstood the question.
There is an overload of EntreeDropDownList.Items.Add that takes and EntreeChoice.EntreeChoiceListItem as the parameter. EntreeChoice.EntreeChoiceListItem has a constructor that takes a boolean value that sets if the item is selected. This is how you can set the selected values.
ddl.Items.Add(new EntreeChoice.EntreeChoiceListItem("1", "1", true));
|
|
Rank: Active Member
Joined: 7/20/2010 Posts: 13 Points: 39 Location: usa
|
Thanks It worked
|
|
|
Guest |