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
action of clearGridData()
01/08/2009
13:09
Avatar
adahsu
Member
Members
Forum Posts: 3
Member Since:
29/07/2009
sp_UserOfflineSmall Offline

Hi,

  It seems the clearGridData() method will not clear the grid foot row's data, is there any other way

  to clear the foot row's data ?

04/08/2009
01:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

There is no problem to do this automatically, but in most cases we place some texts in the footer which I think they should not be deleted. Instead use footerData method (see docs) to clear the needed values on footer.

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.

06/08/2009
00:17
Avatar
Rayson
Guest
Guests

Dear Tony,

Eventhough the cellvalues can be set to empty string individually, the grid line of the footerrow are still there. As footerrow cannot be changed, I set $(".ui-jqgrid-ftable").css('visibility','hidden') to hide the footerrow completely. Of course, it would be much better if that can be done by specifying a parameter in clearGridData.

Best regards,

Rayson

06/08/2009
07:58
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Done. Will be in 3.5.1. Also added a option to clear the footer if available.

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.

06/08/2009
21:29
Avatar
Rayson
Guest
Guests

Great, thanks Tony!

19/08/2009
00:14
Avatar
Rayson
Guest
Guests

Dear Tony,

I downloaded 3.5.2 and tried .clearGridData(true), however it seems not working. Please check.

Thanks & regards,

Rayson

19/08/2009
04:49
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Please clear the cache and test. It should work. Testted many times

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.

20/08/2009
00:07
Avatar
Rayson
Guest
Guests

Dear Tony,

I found out the problem was caused by using .footerData in gridComplete. I used that instead of userDataOnFooter:true because I don't want the footer to follow column formats (I have a count below checkbox column). It seems clearGridData() also triggered gridComplete and footer was refreshed with old data after cleared by $(".ui-jqgrid-ftable td",$t.grid.sDiv).html(" "); in grid.base.js. Besides, footer's grid lines will remain there if the cell values are cleared individually.

Best regards,

Rayson

21/08/2009
01:41
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello Rayson,

Yes, clearGridData call a internal updatepager function, which call gridComplete event. This is needed to set correctly the information on pager if available.

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/2009
22:03
Avatar
Rayson
Guest
Guests

Dear Tony,

What is your suggestion to fix this?

Best regards,

Rayson

30/08/2009
10:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I think there is no need to fix it, since the updatepager is a basic function. Maybe you can do something like this:

function myGridComplete () {

// here your code for grid complete

}

$("#mygird").setGridParam({gridComplete:null}).clearGridData(true).setGridParam({gridComplete:myGridComplete});

But I'm not sure where you call this.

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.

31/08/2009
21:58
Avatar
Rayson
Guest
Guests

Dear Tony,

The empty grid lines on footer row still remain there. Is there any reason for not using the same approach as clearing the grid data??

Best regards,

Rayson

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
93 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