This is a migrated thread and some comments may be shown as answers.

Tab Strip selected value

4 Answers 369 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Veteran
Marcin asked on 24 Jan 2013, 10:44 AM
I'm trying to use tab strip in standard display/value way. So I'm creating data which have two propertes name and value. I would like create tabs that will display name, but after select I will have access to value, to make some opertaions on value not on name.

Is it possible?

4 Answers, 1 is accepted

Sort by
0
Holger
Top achievements
Rank 1
answered on 24 Jan 2013, 12:39 PM
Hi Marcin,

Yes it is possbile. Please have a look at this sample: http://jsbin.com/azihib/1/edit

Regards,
Holger
0
Marcin
Top achievements
Rank 1
Veteran
answered on 24 Jan 2013, 01:02 PM
I would like to use dataSource as data, and I prefer not preserve that in any variable. I would like to obtain value from tab itself (e.g. from data-value attribute of tab)
0
Holger
Top achievements
Rank 1
answered on 24 Jan 2013, 02:07 PM
AFAIK the TabStrip widget does not support binding to the DataSource component, thus you will either have to bind to local data (e.g. array) or initialize from HTML.

Otherwise, when populating the TabStrip widget from data, how would like to apply a data-value attribute to the HTML?
0
Marcin
Top achievements
Rank 1
Veteran
answered on 24 Jan 2013, 02:15 PM
Ach, I was thinking it can be used like other components with datasource. That's why I was supprised that I can find:
dataTextField: "text",
but cannot find:
dataValueField: "value",
and then with "onChange" method I can access to:
this.value()
but that retursn text instead of value.
Tags
TabStrip
Asked by
Marcin
Top achievements
Rank 1
Veteran
Answers by
Holger
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Veteran
Share this question
or