Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

OBSOLETE - How to implement check boxes with SelectRows and SelectAllRowsOnPage features in a grid's template

$
0
0

UPDATED:

Starting with version v2014 vol 1 (v14.1), this functionality is available out of the box:
S173621: ASPxGridView - Add the built-in SelectAll CheckBox for Command Column

Simply set the GridViewCommandColumn.SelectAllCheckboxMode property to GridViewSelectAllCheckBoxMode.AllPages to activate it. Please refer to the ASP.NET: GridView Select All Rows Updated blog post and the Select All Rows demo for more information.

If you have version v14.1+ available, consider using the built-in functionality instead of the approach detailed below.
If you need further clarification, create a new ticket in our Support Center.

This example not only illustrates the ASPxClientGridView.SelectRows and ASPxClientGridView.SelectAllRowsOnPage, but also shows a way in which to implement these features with check boxes within a grid's templates.

Question Comments

Added By: Bradmartin41 at: 7/19/2013 1:41:22 PM    

This works wonderfully, except I have one issue. When first selecting the 'cbAll' checkbox in the header, all rows are selected, but the header checkbox deselects itself. Then I have to select all again, then deselect. Odd behavior.

Any ideas?

Added By: Gerardo Reyes 1 at: 8/14/2014 10:17:20 AM    

This example doesnt work properly when there are two grids in the same page and try to have the same functionality with checkboxes columns

Added By: Larry (DevExpress Support) at: 8/14/2014 10:40:58 AM    

Hello,

To process your recent post more efficiently, I created a separate ticket on your behalf: T140431: How to implement check boxes with SelectRows and SelectAllRowsOnPage features in a grid's template when using two or more grid's. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Added By: Gherda Corrao at: 6/1/2015 3:57:34 AM    

Hi,
I need to manage a custom checkbox to perform the "SelectAll" function and I'm trying to reproduce this example in MVC, but in the Init event of the checkbox, NamingContainer is always null, how do I get the grid object in MVC?

Added By: Gherda Corrao at: 6/1/2015 4:05:14 AM    

The purpose is to replicate the functionality of the example:
https://www.devexpress.com/Support/Center/Example/Details/E3996

Added By: Mike (DevExpress Support) at: 6/1/2015 5:32:39 AM    Hello Gherda,

To process your recent post more efficiently, I created a separate ticket on your behalf: T249406: GridView - How to select all rows via custom CheckBox except disabled rows on the client side. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.

Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>