So myStore
is store of the grid right? If so, add this method to it:
,getUniqueValues:function(field) {
var me = this
,results = {}
;
me.each(function(record){
var value = record.get(field);
results[value] = {};
results[value][field] = value;
});
return Ext.Object.getValues(results);
} // eo function getUniqueValues
Now, listen to myStore
load event (if it is remote) and call getUniqueValues
in the listener passing the field name you want the unique values from. Having the unique values array, you can do whatever you want to do with it, e.g. load to a combo, use as list for grid filter, etc.
Of course you can modify the format of the returned data by changing the method itself.