Announcement

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

    Get the row count in a ListGrid

    Dear Team,

    We are using SC11.0p

    We have a ListGrid with data, when we try to do listgridId.getTotalRows() -- we are getting correct result

    but when the ListGrid has some data grouped then we are getting worng result. I have explained in the below example.

    Try this link and put the below code in it and try it.

    You will find 18 rows instead of 14 because of there are extra rows showing the grouping data.

    https://www.smartclient.com/smartcli...ynamicGrouping

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width:522, height:224,
        alternateRecordStyles:true, 
        dataSource: countryDS,
        // display a subset of fields from the datasource
        fields:[
            {name:"countryName"},
            {name:"government"},
            {name:"continent"},
            {name:"countryCode", title:"Flag", width:40, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png", canEdit:false}
        ],
        groupStartOpen:"all",
        groupByField: 'continent',
        autoFetchData: true,
    dataArrived:function(startRow, endRow)
    {
        alert(this.getTotalRows());
    }
    });

    Thanks in advance.

    #2
    See getOriginalData().

    Comment

    Working...
    X