Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
addRowData after clearGridData bug
10/04/2010
08:25
Avatar
Sean Liang
New Member
Members
Forum Posts: 2
Member Since:
10/04/2010
sp_UserOfflineSmall Offline

Here is the grid definition:

    $('#dataList').jqGrid({
        datatype : 'local',
        colNames : ['ID', 'NAME'],
        colModel : [
          {name : 'id', index : 'id', width : 150},
          {name : 'name', index : 'name', width : 90}
        ],
        pager : '#pager',
        pginput : false,
        pgbuttons : false,
        viewrecords : true,
        multiselect : true
    });

I'd like to set the data base on user's choice, and the calling code look like this:

// clear previous grid data
$('#dataList').jqGrid('clearGridData');
for (var i = 0; i < data.length; i++) {
    var item = data[i];
    $('#dataList').jqGrid('addRowData', item.id, {
        id : data.id,
        name : item.name
    });
}

and the "from" and "to" number in footer bar are wrong after that:

<div class="ui-paging-info" style="text-align: right;" dir="ltr">View -19 - 10 of 30</div>

Is it a bug?

I'm using jquery 1.4.2 with jquery-ui 1.8.

12/04/2010
09:20
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thanks. This is a bug and is fixed in GitHub

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

26/08/2010
00:28
Avatar
scawa1952
Villa Rica, Georgia
Member
Members
Forum Posts: 11
Member Since:
25/08/2010
sp_UserOfflineSmall Offline

I have downloaded the latest version of jqGrid 3.7.2 , added them to my project, cleared the cache and javascript cache and I am still getting this problem with 'clearGridData'.

my javascript is:

    $("#eventList").jqGrid('clearGridData');           
    for(var i=0;i<=mydata.length;i++) {
        $("#eventList").jqGrid('addRowData', i+1 ,mydata[i]);
    }

106 records are loaded and the navbar shows 'View -9 - 96 of 106'.

If I comment out the 'clearGridData' then it works, but loading another set of data loads another 106 records and I now have 212 records in the grid.

It appears that the bug fix to 'clearGridData' isn't working.  Do I need to load a newer version of jQuery or the other libraries?

Stephen McConnell

Stephen McConnellnnn"Boredom is a personal defect."n -- Lamar Stephens

27/08/2010
19:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thanks. I see some problems here. Will publish the fix in 3.8 soon.

Best Reagrds

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information