Reputation: 4617
Is there a way to check if flex datagrid column is empty or not? I tried to search for a DataGridColumn that would allow me to that but I couldn't find any.
Upvotes: 0
Views: 1141
Reputation: 25489
If you mean to say that the value of that GridColumn is null for all rows then this snippet should work:
//myDG is the datagrid
var allNull:Boolean=true;
for each(var o:Object in myDG.dataProvider) {
if(o.myColumnName != null) {
allNull=false;
break;
}
}
trace(allNull); //false = all is not null, true = everything in that column is null
Upvotes: 3