-
4 Nov 2011 8:48 PM #1
Unanswered: CellEditing : How to access editors in a row
Unanswered: CellEditing : How to access editors in a row
Hi,
I have gridpanel with cellEditing plugin. The users can add row dynamically and are allowed to set Delivery date ,Start Date, and End Date. Both Start date and End Dates will disabled by default. I want to enable the start date field when the user select delivery date and set the minimum date greater than or equal to selected delivery date . How can i implement this ? I have done this using a normal form but not in a grid .....
I have posted a question in 'Discussions' but didn't get any response yet...Code:{ xtype: 'gridpanel', id:'contentOrder_grid', store: tList_store, height: 525, title:'TList', columns: [{xtype: 'rownumberer', text:'SI',width:30}, { text : 'TName', sortable : true, dataIndex: 't_name', flex:1 }, { text : 'Delivery Date', sortable : true, allowBlank:false, dataIndex: 'delivery_date', renderer:function(v){ return (v && isValidDate(v))?Ext.Date.format(v,'d-M-Y'):v; }, editor: { xtype: 'datefield', format : 'd-M-Y', listeners:{ focus: function(showPicker) { showPicker.onTriggerClick(); }, 'select':function(){ } } } },{ text : 'Start Date', sortable : true, allowBlank:false, dataIndex: 'start_date', renderer:function(v){ return (v && isValidDate(v))?Ext.Date.format(v,'d-M-Y'):v; }, editor: { xtype: 'datefield', format : 'd-M-Y', disabled:true, listeners:{ focus: function(showPicker){ showPicker.onTriggerClick(); } } } },{ text : 'End Date', sortable : true, allowBlank:false, dataIndex: 'end_date', renderer:function(v){ return (v && isValidDate(v))?Ext.Date.format(v,'d-M-Y'):v; }, editor: { xtype: 'datefield', disabled:true, format : 'd-M-Y', listeners:{ focus: function(showPicker){ showPicker.onTriggerClick(); } } } },{ text:'product_id', flex:1, dataIndex:'screen_id', hidden:true }], tbar: [{ itemId: 'rt', text: 'Remove t', iconCls: 'remove', handler: function() { } }] ,plugins: [cellEditing] }
-
5 Nov 2011 6:00 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,714
- Vote Rating
- 436
- Answers
- 3113
You are using CellEditing so there is only one editor at one time. You can get the value of a cell by going to the Store and getting the record. If you want to start editing on a cell based on another cell the CellEditing plugin has a startEdit and startEditByPosition methods.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.



Reply With Quote