Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    checkbox selection in listgrid

    Click on the checkbox select for the only record in the listgrid. You'll notice that the "Select all" checkbox is checked. Now uncheck the row. The "Select all" is not unchecked.

    Code:
    countryData = [
    
    {
        continent:"North America",
        countryName:"United States",
        countryCode:"US",
        area:9631420,
        population:298444215,
        gdp:12360.0,
        independence:new Date(1776,6,4),
        government:"federal republic",
        government_desc:2,
        capital:"Washington, DC",
        member_g8:true,
        article:"http://en.wikipedia.org/wiki/United_states"
    }
    
    ]
    
    isc.ListGrid.create({
        ID: "countryList",
        width:500, height:224, alternateRecordStyles:true,
        data: countryData,
        selectionAppearance:"checkbox",
        fields:[
            {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},
            {name:"countryName", title:"Country"},
            {name:"capital", title:"Capital"},
            {name:"continent", title:"Continent"}
        ],
        selectionChanged: "selectedCountries.setData(this.getSelection())"
    })

    #2
    We've applied a fix for this issue - please see the next nightly build (8.2d / 3.1d branch)

    Regards
    Isomorphic Software

    == Update: The issue also existed in the 8.1p / 3.0p branch. Resolved there too.
    Last edited by Isomorphic; 4 May 2012, 10:02.

    Comment


      #3
      we are using 8.2p branch

      Comment


        #4
        That was a typo - sorry for the confusion.
        It's fixed on the 8.2p branch (And 3.0p for SmartGWT users), and on the 8.3d branch (and 3.1d for SmartGWT users)

        Comment


          #5
          Using the latest version of SmartGWT 3.0 downloaded from the below link, this issue is still present.

          http://www.smartclient.com/product/download-bounce.jsp?product=smartgwt&license=lgpl&version=3.0p&nightly=true

          Comment


            #6
            Is it possible to differentiate between selection in checkbox and selection via recordClick? I want to be able to just use the checkbox for bulk actions and selection via recordClick to be just for single actions.

            Comment


              #7
              Don't quite follow this, but it sounds like you would effectively want getSelectedRecords() to return two different and conflicting things. You can use a field of type:"boolean" if you want checkable records where the checked records are independent of selection.

              Comment


                #8
                Ok. But then I would lose my ability to multi select via the header checkbox - or is this also feasible?

                Comment


                  #9
                  If you wanted a "select all" behavior for this boolean column, you could set field.icon, no title, and implement the behavior via headerClick.

                  Comment


                    #10
                    Thanks.

                    BTW, the original problem with the header checkbox is confirmed fixed in the 05-11 8.2p branch

                    Comment

                    Working...
                    X