You should check if element implements ListElement or if it implements DataSource or DataGrid aware interface