Announcement

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

    ListGrid canEdit on double click

    I have the following code below (countryData is from SC Feature Explorer). Ignore the multiple background and country name fields. Scroll horizontally all the way to the end. Double click on the last countryName column to enter edit mode. Notice that it jumps back to the first column of that row.

    My question is, is there any way to have the listgrid stay on the row column that I have double clicked on?

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:400, height:"100%", alternateRecordStyles:true,canEdit: true,
        data: countryData,
        fields:[
            {name:"countryName", title:"Country", width:120},
            {name:"background", title:"Background"},
            {name:"countryName", title:"Country", width:120},
            {name:"background", title:"Background"},
            {name:"countryName", title:"Country", width:120},
            {name:"background", title:"Background"},
            {name:"countryName", title:"Country", width:120},
            {name:"background", title:"Background"},
            {name:"countryName", title:"Country", width:120},
            {name:"background", title:"Background"},
            {name:"countryName", title:"Country", width:120},
            {name:"background", title:"Background"},
            {name:"countryCode", title:"Flag", align:"center", width:50, type:"image", imageSize:24, imageURLPrefix:"flags/24/", imageURLSuffix:".png"}
        ],
        wrapCells: true
    })
    Last edited by acarur01; 23 Jun 2010, 13:42.

    #2
    This is a side effect of using the same field name twice, which is invalid.

    Comment


      #3
      Ok. Perhaps it wasn't the best example then.

      I DO see the problem with my listgrid, which does a server callback on record click. All my columns are unique in datasource as well as naming. When the callback is done, it goes back to the beginning of the row.

      Comment


        #4
        Hard to suggest a cause for this, given that when you set saveByCell, server trips are also performed on every cell transition but this side effect does not occur.

        If you don't want to look for the cause, a brute force approach to solving this would be to record the current edit row and column when you initiate your server call, and force editing back to that coordinate by calling startEditing() when your server trip completes.

        Comment

        Working...
        X