Announcement

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

    8.2 regression: changing removeFieldDefaults

    Smartclient 8.2 Power

    I was using this code to ask for confirmation on remove of records:
    Code:
    isc.ListGrid.changeDefaults("removeFieldDefaults",
    					{
                            recordClick: function(viewer, record, recordNum, field, fieldNum, value, rawValue) {
    							var callback = function(){viewer.removeData(record);};
    							isc.confirm("Remove record?", function(value) { if(value) {callback();} });
    						}
    					});
    but with 8.2 version is no longer working.
    Last edited by claudiobosticco; 19 Dec 2011, 01:32. Reason: solved (not a bug - was my fault)

    #2
    any feedback on this bug?

    it's reproducible in the showcase.

    it seems that recordClick is not triggered by the removeField.

    please let me know because I was overriding the recordClick to add other behavious and if it's no longer possible I must change my approach.

    Comment


      #3
      We never documented recordClick as something that was triggered here. Look at the docs, there is now a way to set a confirmation message directly if that's what you want.

      Comment


        #4
        in the past I was doing that based on what the docs says for removeFieldDefaults:
        "The default configuration includes a ListGridField.recordClick() handler which calls ListGrid.removeData() to actually perform the data removal."

        sorry for not noticing warnOnRemoval attribute, and the very nice removeRecordClick method (that's what I need).

        btw, I think it would be useful to have something like '@since 8.1' in the docs.

        thank you very much for the heads up!

        Comment

        Working...
        X