PDA

View Full Version : Sorting on grid columns not working where dataIndex is mapped to association models



ankits
11 Feb 2015, 11:02 PM
Hi,

I have a grid where for a column dataIndex is mapped to a value coming from an association model.

When I am trying to sort the column,it is not working.

CodeSnippet :
{
text : 'Source Time',
tooltip : 'Source Time',
dataIndex : 'sourceFiles.time',
renderer : function(val, meta, record)
{
var count = record.get('sourceFiles').length;
if (count === 0)
{
return null;
}
else if(record.get('sourceFiles')[0].time && record.get('sourceFiles')[0].time !== null)
{
return rmt.util.DateConverter.ConvertFromMillisecondsToDayAndTimeWithAmPm(record.get('sourceFiles')[0].time,'d/m H:i');
}


return '';
},
flex : 1,
minWidth : 112,
filter : true
}

ankits
12 Feb 2015, 9:31 PM
It would be really nice if someone could guide me on the same.

joel.watson
15 Feb 2015, 8:46 PM
It would be really nice if someone could guide me on the same.

Can you provide a runnable test case of this issue? https://fiddle.sencha.com

Thanks!
Joel