Announcement

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

    REcordlist.remove error :Object doesn't support this property or method

    Any Ideas? why it is not supported. The listgrid is not refreshing so I am trying to force it here..


    ListGrid parentListGrid = DocumentLayout.pendingItemsGrid;
    RecordList recordlist = parentListGrid.getRecordList();

    Record record = null;
    for (int i =0; i<recordlist.getLength(); i++){
    record = recordlist.get(i);
    String docId = record.getAttribute("documentId");
    if (docId.equals(documentId)){
    recordlist.removeAt(i);

    break;

    }

    }


    Uncaught JavaScript exception [com.google.gwt.core.client.JavaScriptException: (TypeError): Object doesn't support this property or method
    number: -2146827850
    description: Object doesn't support this property or method
    at com.smartgwt.client.data.RecordList.removeAt(Native Method)
    at com.citi.gdos.prs.client.forms.AttestForm.refreshParentGrid(AttestForm.java:501)

    #2
    Your grid is databound (has a DataSource). Use removeData() to remove records - this will issue a "remove" dsRequest against the server.

    Comment

    Working...
    X