Hello,

What mean Combobox selectionColumn property ? Maybe can explain ? or get small example ?

Thanks

asked 03 Dec '13, 11:06

AlfAbetas's gravatar image

AlfAbetas
611417
accept rate: 9%


Hi,

selectionColumn points to a column in the listDatasource, just like displayColumn and valueColumn.

If you set a selectionColumn, the comboBox will show the values in the displayColumn in its list as usual, BUT it will show the value in the selectionColumn after the user chooses a value from the list.

For example, let's say that our Employee table has two rows:

ID FIRST_NAME LAST_NAME
 1   JOE        SMITH
 2   JOHN       ADAMS

And this is how our combobox is set up:

<comboBox listDataSource="Employees" valueColumn="ID" displayColumn="FIRST_NAME" selectionColumn="LAST_NAME"/>

When you open the list of the combobox, you will see JOE and JOHN. But after you make a selection, the combobox will display the last name of your selection.

Hope this helps.

Kind Regards,
Yalim

link

answered 03 Dec '13, 11:51

Yalim%20Gerger's gravatar image

Yalim Gerger ♦♦
1.8k5
accept rate: 15%

edited 03 Dec '13, 11:52

Can you give an example when and why you would use this.

link

answered 03 Mar '14, 08:48

Raymond's gravatar image

Raymond
24328
accept rate: 0%

Hi Raymond,

I just had a usecase for this. I have a combobox in which i want a user to select a time. The list contains hours:minutes, like
09:00
09:15
09:30
09:45

Now i want the user to select an hour bij starting to type a 9 instead of 09. Now the displaycolumn comes in.. I extended my listDatasource to have values like
9:00
9:15
9:30
9:45

So when a user types 9 in the combobox, the drop-down will show
9:00
9:15
.. but after he makes a selection, the combobox will show:
09:00

Best,
Michiel

(05 Mar '14, 05:58) Michiel A

Great. Very nice, thanks Michiel.

(05 Mar '14, 06:03) Raymond
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×30

Asked: 03 Dec '13, 11:06

Seen: 1,264 times

Last updated: 05 Mar '14, 06:03


© Copyright Gerger 2017