Announcement

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

    Filter not working for ListGrid when it not data bound

    The List grid has showFilterEditor and filterOnKeypress property set as true but the grid filter does not work for any of the fields.
    The ListGrid created is not data bound i.e. not associated with a dataSource but is populated with the "setData" callback(see code snippet)
    SmartClient version 7 is in use.

    Code:
    isc.ListGrid.create({
        ID: "pcSDSingleInstrIndeptList",
        width:500,height:260,
        	alternateRecordStyles:true,	showFilterEditor: true,
        filterOnKeypress: true,
        canEdit:false,
        fields:[
    {name:"identifier", title:"Identifier", width:80, canEdit:false},    
            {name:"issueName", title:"Instruments", width:200, canEdit:false},
            {name:"coupon", title:"Coupon", width:60, canEdit:false},
            {name:"maturityDate", title:"Maturity", width:60, canEdit:false},
            {name:"sortComment", title:"Sort Comment", width:80, canEdit:false}
        ],
        saveLocally: true,
        autoSaveEdits: false,
        canReorderRecords: true,
        canDragRecordsOut: false,
        canAcceptDroppedRecords: true,
        dragDataAction: "move",
    	transferDragData  : function () {
    		hasPCChangesOnSD = true;
    		return this.Super("transferDragData");
    	}
    });
    isc.DataSource.get("instrumentDS").fetchData({userID: userID, sectorID: sectorID, instrumentID: instrumentId, independentOnly: "independentOnly"}, "pcSDSingleInstrIndeptList.setData(data)", null);

    #2
    The filtering feature requires a DataSource (to provide field types and other information).

    Comment

    Working...
    X