PDA

View Full Version : [CLOSED] Form -> Multi Selector



mohan.bizbites
Nov 24, 2014, 8:59 AM
Hi Team

Is it possible to display more than one field in MultiSelectorSearch List?
http://examples3.ext.net/#/Form/Miscellaneous/MultiSelector/

Regards
Mohan

Daniil
Nov 24, 2014, 7:24 PM
Hi Mohan,

You can to override the MultiSelectorSearch's makeDockedItems function.
http://docs-origin.sencha.com/extjs/5.0.1/source/MultiSelectorSearch.html#Ext-view-MultiSelectorSearch-method-makeDockedItems

mohan.bizbites
Nov 25, 2014, 5:38 AM
Hi Daniil

Thanks for the reply. It would be great help, if you can provide some example.

Regards
Mohan

Daniil
Nov 27, 2014, 4:34 AM
Here you are. You should put this override into the page's <head>.

Example

Ext.view.MultiSelectorSearch.override({
makeDockedItems: function () {
return [{
xtype: 'textfield',
reference: 'searchField',
dock: 'top',
hideFieldLabel: true,
emptyText: this.searchText,
triggers: {
clear: {
cls: 'x-form-clear-trigger',
handler: 'onClearSearch',
hidden: true
}
},
listeners: {
change: 'onSearchChange',
buffer: 300
}
}, {
xtype: 'textfield',
dock: 'top',
value: 'Hello!'
}];
}
});

mohan.bizbites
Nov 28, 2014, 3:50 AM
Hi Danil,

Thanks for you Help :)

I want to have mutliple fields in the selector display view, see the image below

http://forums.ext.net/attachment.php?attachmentid=16681&stc=1

Regards
Mohan

mohan.bizbites
Dec 04, 2014, 9:13 AM
Hi Team

Any update on this post please?

Regards
Mohan

Daniil
Dec 04, 2014, 3:06 PM
Sorry for the delay.

As far as I can see you need additional columns, don't you?

If so, you can define any Columns via SearchGridConfig.

Example

<ext:MultiSelectorSearch runat="server" Field="Name">
<SearchGridConfig runat="server">
<ColumnModel>
<Columns>
<ext:Column runat="server" Text="Name" DataIndex="Name" Flex="1" />
<ext:Column runat="server" Text="Surname" DataIndex="Surname" Flex="1" />
</Columns>
</ColumnModel>
</SearchGridConfig>
</ext:MultiSelectorSearch>