Announcement

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

    Selecting a checkbox in a ListGrid

    In the following simple test case I have tried to define a ListGrid column with a checkbox.

    It seems that to check and unchecked box in a row, it takes **THREE** clicks, the first click selects the row, the second click selects the field, the third click actually sets the value of the checkbox. Repeated clicks then set and unset that checkbox until you try to set/unset a checkbox in a different row (three clicks again).

    This is obviously a big problem for usability, but I can't see a way around it.
    I am using v7.0 rc2 and see the same behaviour in Chrome and Firefox (have not tested in other browsers).

    Is there a way to get a checkbox to be set/unset with a single click as the user expects?

    Code:
    var data = [{"Foo":"bar1","Sel":false},{"Foo":"bar2","Sel":true}]
    			
    		isc.ListGrid.create({
                    ID: "Grid_3",
                    title: "People",
                    width: 500,
                    height: 250,
                    alternateRecordStyles: true,
                    selectionType: "single",
                    data:data,
                    fields: [{name:"Foo",type:"Text",title:"Foo"},{name:"Sel",type:"boolean",title:"Sel",canEdit:true}]
                });
    Thanks.

    #2
    It takes 2 clicks to enter edit mode, one click to change the select box. To make it settable with one click, set canToggle:true.

    Comment


      #3
      Good tip, I didn't see that in the docs. However, it seems there is a strange behaviour when a ListGrid relies on a RestDataSource. When a RestDataSource is being used, it still takes 3 clicks to select a checkbox even when canToggle is true.

      It took me a while to track that down, but as soon as a replaced the ListGrid.dataSource to a ListGrid.data pointing to a local data object, the issue disappeared.

      I'm really starting to like SmartClient, and this forum, but these little details make me worried.

      Is this a known issue or should I put together a simple enough test case to post?

      Comment


        #4
        Works fine in all samples and test cases. This suggests your RestDataSource is broken. In the RPC tab you should see a request to save the toggled boolean - something is wrong with your response.

        Comment

        Working...
        X