Announcement

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

    listgrid delete icon should be disabled if row is disabled

    I have a listgrid that is set using the setdata method -- that is, it is NOT directly connected to a rdbms datasource. If a row in the listgrid is disabled via:

    records[i].setEnabled(false);

    or if it's edit property is set to false via:

    records[i].setAttribute("_canEdit", false);

    a user can still click on SmartGWT "delete" icon and it will delete the record. Is this a bug? I believe that if a record is marked disabled, the delete icon should also be disabled? Is there a way to do this? Or, at minimum, is there a way to intercept the "delete" method that the delete icon calls? (I tried overiding the listgrid's removeRecordClick method, markRecordRemoved method, and even the setCanRemoveRecords method, but the built-in SmartGWT delete icon doesn't seem to call any of these methods. Is this correct?)

    (As an aside, I tried creating my own delete icon some weeks ago, but as I recall, the built-in one in SmartGWT seemed to work "better", but I can retest this. By "better", I mean that it didn't give me an error when trying to delete a "new" record; whereas my own delete button seemed to complain when trying to delete a "new" record. But, I can retest this if this is the only way I can solve this problem. Ideally, though, I can just use the prebuilt SmartGWT delete icon and overide as needed.)

    ========================
    Full Infrastucture Details:
    ==================================
    SmartGWT Version: SC_SNAPSHOT-2011-12-05/PowerEdition Deployment (built 2011-12-05)

    OS: Windows XP Pro
    IDE: MyEclipse 10.0 with Google Plugin for Eclipse (2.5)
    Browser: Mozilla Firefox 4.0.1
    GWT SDK: 2.4.0
    Sun JDK 1.6.0_27

    #2
    any takers on this?

    Comment

    Working...
    X