cancel
Showing results for 
Search instead for 
Did you mean: 

List box value highlighted by Default

Former Member
0 Kudos

I am using Listbox as user selection for Year and Quarter (filled via scripting). I have noticed it is highlighting a first value by default when I execute the dashboard.

My question - is this default behavior?

Did anyone else face this? any workaround?

Thanks,

Rajan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Yes , This is Default Behavior .

You can Change the Default Selected Value By

LISTBOX_1.setSelectedValue("2013");

LISTBOX_2.setSelectedValue("Q4");

Former Member
0 Kudos

Hi Nikhil,

I do not want to select any values by default. Is there a way not to highlight any values unless selected?

Thanks,

Rajan

Former Member
0 Kudos

Hi,

If Multiple Selection is False Then It will select first value by Default .

You can do one Thing Add 2 ListBox

1) Multiple True (Visible & Above 2nd ) //Add List To this ListBox On Startup  . LS_1

2) Multiple False (Visible & Below 1st ) //Add List To this ListBox also . LS_2

Now On Click event of LS_1

Write below code .

var Selected = LS_1.GetSelectedValue();

LS_2.SetSelectedValue(Selected);

LS_1.SetVisible(False);

LS_2.SetVisible(True);

LS_2.OnSelect();

Former Member
0 Kudos

Nikhil,

I Listbox has already set for Multiple Values.

To be clear - Data is not filtered (value is not selected) its only highlighting first value in the list.

And I am not able to quite follow what you are trying to do with the "one Thing" you have mentioned.

Here is what I am currently doing -

On Application Startup - Filling in the listbox (All values are selected from DataSource)

OnSelect for ListBox - I am filtering the data at DataSource (multiple selection = True)

                                   - Textbox.settext (based on values selected from listbox)

--------------------

Also I am doing further display of values selected in ListBox in a separate Text Box as mentioned above.

Thanks,

Rajan

Former Member
0 Kudos

Hi,

Use "" to deselect Default value .

On Application Startup -

Filling in the listbox (All values are selected from DataSource)

LISTBOX_Used.setSelectedValue("");

Former Member
0 Kudos

Thanks Nikhil

This worked!

Answers (1)

Answers (1)

alexandre_dussac
Participant
0 Kudos

Hi Rajan, and could you add the "All values" to the list boxes?

Alex-