Bug Report T454910
Visible to All Users

Web - ASPxGridListEditor loads the entire data set in Server Mode when ShowSelectionColumn is set to True

created 8 years ago

It is a known Server Mode Limitation that the selection of all grid rows using the built-in SelectAll check box is not supported, but ASPxGridListEditor always configures the grid by setting the GridViewCommandColumn.SelectAllCheckboxMode property to AllPages.

As a workaround, explicitly set this property to Page in code:

C#
using DevExpress.ExpressApp; using DevExpress.ExpressApp.Web.Editors.ASPx; using DevExpress.Web; public class GridListViewController : ViewController<ListView> { protected override void OnViewControlsCreated() { base.OnViewControlsCreated(); var listEditor = View.Editor as ASPxGridListEditor; if (listEditor != null && listEditor.Model.DataAccessMode == CollectionSourceDataAccessMode.Server) { foreach (var column in listEditor.Grid.Columns) { var commandColumn = column as GridViewCommandColumn; if (commandColumn != null && commandColumn.ShowSelectCheckbox) { commandColumn.SelectAllCheckboxMode = GridViewSelectAllCheckBoxMode.Page; } } } } }

Answers approved by DevExpress Support

created 8 years ago (modified 7 years ago)

We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

Additional information:

The ASPxGridView must NOT display this SelectAll button when a server mode data source is bound to it, because using this feature defeats all server mode benefits. We have corrected this mistake and now this button is hidden in this mode by default (SelectAllCheckboxMode = None). The "Select All" button is now available in Client and DataView modes only (SelectAllCheckboxMode = AllPages).

If you want, you can implement a custom solution above to enable selection of all records on the currently active page only when DataAccessMode = Server. Alternatively, you can set DataAccessMode = Client/DataView  for a required ListView node using the Model Editor (of course, it you do not have many data records).
If this solution does not help you, please describe your real life use-case scenario where this SelectAll feature is needed when grid is operating in server mode.

Search keywords
select all is missing, disappears, disabled, selection, ASP.NET, server mode, grid column header, checkbox, check mark, tickbox

    Comments (2)
    RE RE
    Reinhold Erlacher 8 years ago

      Hello,
      I have a question regarding the removed SelectAll.Checkbox in Web, when ServerMode.
      What is the best way to use ServerMode with in place reports?

      I have a grid with about 800 rows in servermode and now I would like to print an in place report selecting all rows.
      How should I do this?

      Thanks for your help
      Regards
      Reinhold

      Dennis Garavsky (DevExpress) 8 years ago

        @Reinhold:
        I've created a separate ticket on your behalf (T474351: Selecting all reports and printing them). It has been placed in our processing queue and will be answered shortly.

        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.