Breaking Change T980647
Visible to All Users

Blazor - Changes in GridListEditor's API

What Changed

We removed the following GridListEditor properties:

  • ShowSelectionColumn
  • ShowAutoFilterRow
  • IsGroupPanelVisible
    You can find their equivalents in the Application Model.

We also replaced the SetSelectedObjectsKeys(IEnumerable selectedObjectsKeys) method with SetSelectedObjects(IEnumerable objectsToSelect).

Reasons for Change

These APIs were designed for internal purposes.

Impact on Existing Apps

If you use these APIs, you will get a compilation error. To address this error, do the following:

  1. Use the ShowSelectionColumn, ShowAutoFilterRow, and IsGroupPanelVisible property equivalents from the Application Model:

    • IModelListViewBlazor.ShowSelectionColumn
    • IModelListViewShowAutoFilterRow.ShowAutoFilterRow
    • IModelListView.IsGroupPanelVisible
  2. If you used the SetSelectedObjectsKeys method, rewrite your code so that it uses the SetSelectedObjects method instead. The following code demonstrates how to do this:

C#
using System.Collections.Generic; using DevExpress.ExpressApp; using DevExpress.ExpressApp.Actions; using DevExpress.ExpressApp.Blazor.Editors.Grid; using MainDemo.Module.BusinessObjects; namespace MainDemo.Module.Blazor.Controllers { public class MyViewController : ObjectViewController<ListView, DemoTask> { public MyViewController() { SimpleAction simpleAction = new SimpleAction(this, "Select Task", DevExpress.Persistent.Base.PredefinedCategory.Edit); simpleAction.Execute += (s, e) => { DemoTask task = ObjectSpace.FirstOrDefault<DemoTask>(d => d.Subject == "1Q Travel Spend Report"); if (task != null && View.Editor is GridListEditor listEditor) { // the following line is obsolete //listEditor.SetSelectedObjectsKeys(new List<DemoTask>() { ObjectSpace.GetKeyValue(task) }); listEditor.SetSelectedObjects(new List<DemoTask>() { task }); } }; } } }

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.