I am using GridView from an old version 14.2.6 of DevExpress MVC (and have no option update it).
Recently because of performance issue I changed the model from IEnumerable to IQueryable and .Bind to .BindToEF. Because of that it speed up drastically. However, I noticed that some functionalities stoped working for columns with type TokenBox (Source column in my example). Columns of other types (ComboBox, DateEdit, ...) works as expected.
When I click on the "pin" to display filter items in the header the list is empty however, there are items in this columns:
When I click on this column header to sort all displayed data becomes empty:
When I get back to IEnumerable model (instead of IQueryable) and .Bind (insted o .BindToEF) everything works as expected.
Parts of the code:
@model IQueryable<SupplierPricingItem>
@*@model IEnumerable<SupplierPricingItem>*@
_grid.BindToEF(string.Empty, string.Empty, (s, e) =>
{
e.QueryableSource = Model;
e.KeyExpression = "Id";
}).GetHtml();
// _grid.Bind(Model).GetHtml();
settings.Columns.Add(column =>
{
column.FieldName = nameof(SupplierPricingItem.SourceLanguagesIdsString);
column.ColumnType = MVCxGridViewColumnType.TokenBox;
var tbProperties = column.PropertiesEdit as TokenBoxProperties;
tbProperties.DataSource = ViewBag.AllSourceLanguages;
tbProperties.TextField = "Name";
tbProperties.ValueField = "Id";
column.Settings.AllowAutoFilter = DefaultBoolean.False;
});

