[CLOSED] How to loop through grouped grid with checkboxselectionmodel

  1. #1

    [CLOSED] How to loop through grouped grid with checkboxselectionmodel

    Hi

    I have a grid that displays groups. I am using a checkboxselectionmodel.

    When I check ALL records, my delete method just deletes all selected rows in the first group, even if records in other groups are checked as well

    
            Dim sm As RowSelectionModel = TryCast(Me.GridPanelTasks.GetSelectionModel(), RowSelectionModel)
    
            Dim idList As New List(Of Long)
    
            For Each row As SelectedRow In sm.SelectedRows
                idList.Add(CLng(row.RecordID))
            Next
    
            // delete all records in idList
    Sorry couldnt find something in the demos, so how do I need to alter my for each in order to include ALL groups and not just the first one

    Second question, is there any way to give group headers a checkbox as well in order to select/unselect all items from a group? I am using a menuitem in a groupcommand right now, but it is a bit ugly because every button is on a different position dependant upon the length of the group name, so I would need something on the left side just next to the expanding '+' icon
    Last edited by Daniil; Mar 28, 2013 at 11:58 AM. Reason: [CLOSED]
  2. #2
    Hi @blueworld,

    Re: deleting

    Could you clarify what exactly the problem is? Does not SelectedRows contain all the records?

    Could you also demonstrate your code for removal?

    Re: a command to select/unselect

    Please start a new forum thread.
  3. #3
    Hi Daniil,

    you can close this Thread it was my fault. I had a hardcoded result limit in my query.
    Sorry

Similar Threads

  1. Replies: 2
    Last Post: Jan 23, 2013, 6:37 AM
  2. Replies: 1
    Last Post: Jan 02, 2012, 8:21 AM
  3. Sorting within Grid panel grouped records
    By ssenthil21 in forum 1.x Help
    Replies: 1
    Last Post: Jul 04, 2011, 7:42 AM
  4. [CLOSED] Add Row to Grouped Grid.
    By rthiney in forum 1.x Premium Help
    Replies: 2
    Last Post: Feb 05, 2010, 4:43 PM
  5. Grouped grid very slow
    By testix in forum 1.x Help
    Replies: 3
    Last Post: Sep 19, 2009, 1:46 PM

Tags for this Thread

Posting Permissions