View Full Version : convert function issue

23 Mar 2010, 11:15 AM
I have a convert function in my Record as follows...

var Record1 = Ext.data.Record.create([
{name: 'first_name', type: 'string'},
{name: 'last_name', type: 'string'},
{name: 'name', type: 'string', convert: function(value, data){return data['first_name']+' '+data['last_name']}}

Then I use dataIndex: 'name' in my grid column but the cell displays 'undefined undefined'.
The values are coming from the database.
Is this because the data is not loaded when the convert function runs?
Any Suggestions?

24 Mar 2010, 5:17 AM
My data comes in XML format and I use a XmlReader to get it in the store.
Is that the problem?
I was able to run the Json version given at http://www.extjs.com/forum/showthread.php?p=299463

Please help