-
31 Aug 2010 3:56 AM #1
multiselect - adding new records
multiselect - adding new records
Hi,
I am new to Extjs and facing problem with multiselect component.
According to my requirement I have four components in the sequential order of below.
Textfield, 2 buttons having text "<" and ">" and finally multiselect component.
If I click on ">" button the text entered in the textfield should go into multiselect as new record.
I am able to do the reverse process like getting the record presented in the multiselect to textbox.
So please help me how can I achieve this functionality. Eagerly waiting for the response.
Thanks in advance.
-Satya
-
31 Aug 2010 6:10 AM #2
which multiselect do u mean? i've searching in extjs and i'm not seeing any component instead i see is a sort of property named multiselect. u've should make a datagrid view or something like that and into it adding the new component after this getting the datagrid with grid.getView()
if u let ut see ur code and pics(printscreen) also it'd be helpful
regards
-
31 Aug 2010 6:44 AM #3
Hi,
It is related to MultiSelect & ItemSelector (xtype: 'multiselect').
In my requirement don't need to use any dataview or datagrid.
Just I have put components horizontally in my page and functionality should work while clicking on buttons.
See the code snippets below.
This is the code to display textfield.
{
xtype :'textfield',
id : 'modelNo',
fieldLabel : 'Model Number',
width : 175
}
This is the code for displaying buttons having text "<",">" on it.
{
xtype :'button',
text : '>',
width : 50,
handler : function() {
greaterthanFunc();
}
}, {
xtype :'button',
text : '<',
width : 50,
style : 'padding-top:20px;',
handler : function() {
lessthanFunc();
}
}
This is the code for displaying ItemSelector.
{
xtype :'multiselect',
id : 'multiselect',
width : 250,
height : 200,
multiSelect : false,
allowBlank : false,
store : [
['1', '111 : One'], ['2', '222 : Two'],
['3', '333 : Three'], ['4', '444 : Four'],
['5', '555 : Five'], ['6', '666 : Six'],
['7', '777 : Seven']],
ddReorder : true
}
If you need more info, pls let me know.
Thanks for your reply
Thanks,
Satya.
-
31 Aug 2010 7:24 PM #4
on button click , get the store of the multiselect component and use store.insert();
check api for correct syntax and refresh the component.
Hope this helps !
-
1 Sep 2010 2:42 AM #5
Thanks a lot for your reply. But I got solution in the following link.......
http://www.sencha.com/forum/showthre...659#post507659
Regards,
Satya.
Similar Threads
-
Adding / Removing items to Ext.ux.Multiselect
By mathewch in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 1 Sep 2010, 2:41 AM -
Adding records to a JsonStore
By andyd01 in forum Ext 3.x: Help & DiscussionReplies: 8Last Post: 2 Dec 2009, 3:23 PM -
Adding MultiSelect Dropdownlist in Editor-grid panel
By AmitOlsys in forum Ext 2.x: Help & DiscussionReplies: 7Last Post: 19 Apr 2009, 10:21 PM -
Adding values in itemselector of EXT.UX.Multiselect
By pachaudhary in forum Ext 2.x: Help & DiscussionReplies: 3Last Post: 7 Jan 2009, 5:11 AM -
Adding / Removing items to Ext.ux.Multiselect
By mathewch in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 20 Feb 2008, 5:18 AM


Reply With Quote