Results 1 to 9 of 9

Thread: 4.1.0 : grid reconfigure() + rowEditing plugin issue

  1. #1
    Sencha User
    Join Date
    Apr 2010
    Posts
    24

    Default 4.1.0 : grid reconfigure() + rowEditing plugin issue

    Hi,

    When I use the reconfigure() function on a grid (with a rowediting plugin), then when I want to call and use the rowediting plugin, the fields don't match with the columns of the grid...

    [IMG][/IMG]

    But with the 4.0.7 this works correctly

    Anyone has a solution ?

    Thanks,

    Bourbourg ( bourbourg is a very tiny town in France )




    Attached Images Attached Images

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Is the alignment of the editor the same before the reconfigure was issued?

    Scott.

  3. #3
    Sencha User
    Join Date
    Apr 2010
    Posts
    24

    Default

    no,
    the alignment of the editor isn't the same before the reconfigure was issuedn before it is correct.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    Several comments:

    Have you tried this on 4.1? There were many fixed to the grid from 4.07 where there were many issues with the virtual scrolling.

    You are using a grouped header grid, with row editing and then using reconfigure?

    Please provide a working example using one of our online examples that displays your problem. You can use an array store or json data for populating the grid.

    Regards,
    Scott.

  5. #5

    Default

    Using the latest release i could find (4.1.1a) i'm having the same issue. The RowEditing editors are not aligned to the grid columns after calling reconfigure().

    You can toggle between the two use cases by commenting the last line (grid.reconfigure)
    How can i avoid this issue or patch it somehow?

    Code:
    Ext.Loader.setConfig({
    	enabled: true
    });
    
    
    Ext.onReady(function () {
    	Ext.create('Ext.data.Store', {
    		storeId:'simpsonsStore',
    		fields:['name', 'email'],
    		data:{'items':[
    			{ 'name': 'Lisa',  "email":"[email protected]"},
    			{ 'name': 'Bart',  "email":"[email protected]"},
    			{ 'name': 'Homer', "email":"[email protected]"},
    			{ 'name': 'Marge', "email":"[email protected]"}
    		]},
    		proxy: {
    			type: 'memory',
    			reader: {
    				type: 'json',
    				root: 'items'
    			}
    		}
    	});
    
    
    	Ext.create('Ext.data.Store', {
    		storeId:'simpsonsStore2',
    		fields:['name', 'email', 'phone'],
    		data:{'items':[
    			{ 'name': 'Lisa',  "email":"[email protected]",  "phone":"555-111-1224"  },
    			{ 'name': 'Bart',  "email":"[email protected]",  "phone":"555-222-1234" },
    			{ 'name': 'Homer', "email":"[email protected]",  "phone":"555-222-1244"  },
    			{ 'name': 'Marge', "email":"[email protected]", "phone":"555-222-1254"  }
    		]},
    		proxy: {
    			type: 'memory',
    			reader: {
    				type: 'json',
    				root: 'items'
    			}
    		}
    	});
    
    
    	var grid = Ext.create('Ext.grid.Panel', {
    		title: 'Simpsons',
    		store: Ext.data.StoreManager.lookup('simpsonsStore'),
    		columns: [
    			{ text: 'Name',  dataIndex: 'name', editor: 'textfield' },
    			{ text: 'Email', dataIndex: 'email', editor: 'textfield'}
    		],
    		height: 200,
    		width: 400,
    		plugins: [Ext.create('Ext.grid.plugin.RowEditing', {
    			clicksToMoveEditor: 1,
    			autoCancel: true
    		})],
    		renderTo: Ext.getBody()
    	});
    
    
    
    
    	grid.reconfigure(Ext.data.StoreManager.lookup('simpsonsStore2'), [
    		{ text: 'Name',  dataIndex: 'name', editor: 'textfield'},
    		{ text: 'Email', dataIndex: 'email', editor: 'textfield'},
    		{ text: 'Phone', dataIndex: 'phone', editor: 'textfield'}
    	]);
    
    
    });

  6. #6

    Default

    Forcing the editor to be re-initialized seems to fix the issue. I have no idea what i'm doing so this method probably leaves instances/listeners lying around but thankful my pages don't have to live very long.

    Something like this:

    Code:
    grid.rowEditing.editor = null;
    grid.rowEditing.getEditor();

  7. #7
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    1,018
    Answers
    1

    Default

    A JavaScript error occurs with ExtJS 4.2.1 in a similar scenario. Here is a bug report.
    http://www.sencha.com/forum/showthread.php?268231

    Thank you, [email protected], setting .editor to null helps remedy the problem.
    Object.NET
    Frameworks and Tools for .NET Developers
    --------------------------------------------------
    Ext.NET - Ext JS for ASP.NET - Examples | Twitter
    Bridge.NET - Write C#. Run JavaScript! - Live | Twitter
    --------------------------------------------------

  8. #8
    Sencha Premium Member
    Join Date
    Aug 2013
    Location
    Tbilisi, Georgia
    Posts
    42
    Answers
    2

    Default

    I have the same layout problemafter reconfigure, row editing plugin at editing phase shows hidden column and layout is broken

  9. #9
    Sencha User
    Join Date
    Aug 2015
    Location
    India
    Posts
    24

    Default

    Quote Originally Posted by [email protected] View Post
    Forcing the editor to be re-initialized seems to fix the issue. I have no idea what i'm doing so this method probably leaves instances/listeners lying around but thankful my pages don't have to live very long.

    Something like this:

    Code:
    grid.rowEditing.editor = null;
    grid.rowEditing.getEditor();

    This solution worked for me too..

    Thanks,
    Nandeesh N
    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •