That works
Thanks for the reply.
Tripp
I know this post is pretty old but the code above didnt work for me but this worked though:
Tony, I have seen both his posts and both replies.
Your “simple” answer in the docs does not work. I too get the same error.
Did you even read his post?
He is using “getGridParam('userData');” as defined in the docs….
and getting “[object Object]” – not the value.
How does one get a footerData value (or userData value) into a variable ?
Thanks
Tripp
The problem with the current implementation in jqGrid is that the scrollbar does not indicate to the user the position within the current table, nor the table's full size. If one page of data is loaded, then the scrollbar only shows that the table is only one page long, whereas the backend might have hundreds of pages. With this behavior, you are not able to reach the last page of the data just by dragging the scrollbar's cursor. The only way to get to the last page of the data is by scrolling to the end of the currently loaded data, waiting for the next page to load, scrolling again to the end of table, waiting,… repeated until you finally reach the last page.
Yahoo Mail uses an appropriately sized gif image to force the proper scrollbar on the right. This way, even if you one one page loaded in the table, the scrollbar shows that the entire dataset is much larger, and you may scroll to the real bottom of the dataset.
I seem to have fixed this problem in ie7 and ie8 by changing the following in ui.jqgrid.css:
.ui-jqgrid .ui-th-div-ie{float:left;width:97%;white-space:nowrap;}
to this
.ui-jqgrid .ui-th-div-ie{white-space:nowrap;}
At first I removed the width, and this fixed the vertical alignment and the extra padding, but now the labels in the table headers wouldn't align to anything but left. So I removed the float:left and that seems to have done the trick. Obviously further testing would probably be warranted but I hope this helps.
It seems to me that this should be the default behavior of jqGrid. Why do you want the latency and performance hit of a round trip to the server just to sort data? Perhaps there should be an option to allow server-side sorting for those that need it, but by default, the client should sort.
Also, I tried using Tony's suggestions above (toggling the grid between local and xml) and while they seemed to work, I had major problems. On some of the grid pages (maybe just the last page?), when sorting, the columns would become different sizes than the headers. I also encountered an issue where I clicking on the next button in the pager took me back several pages. But then clicking again would start to advance me in the right direction. I finally had to give up.
tony said:
Hello,
If this is the case it will be quite easy.
Suppose we have only one or two roots and the rest of the hunderts elments is in child nodes and so on?!?
Regards
Tony
My natural tendency would be to start with the simple case, and then incrementally address the more complex cases as required.
Also… I'd be tempted to say that if you had the case you've described, you likely have a UX issue anyhow and perhaps need to rethink your information architecure. 🙂
-steve
There is a bug;
userDataOnFooter is working with json but not XML
When a datepicker is added to a column in a grid the column generates errors:
colModel date field entry:
{label: 'Date Added', name: 'DateAdded', index: 'DateAdded', width: 80,
ive used this on a magento project, here is the code..
Basically i call the table and use the local data type and loop through the array of records.
getSkinUrl('') ?>
<link rel="stylesheet" type="text/css" media="screen" href="" />
<link rel="stylesheet" type="text/css" media="screen" href="" />
<script src="" type="text/javascript">
<script src="" type="text/javascript">
<script src="" type="text/javascript">
I need to add a new empty row on top of the grid, but I cannot find the addGridRow method anymore. Was it replaced by something else?
I'm trying to add an empty row for adding inline but it keeps saying that the addGridRow method isn't there. Has it been replaced with something else?
I'm wondering about the same thing….any ideas?
thanks for a great grid btw! 🙂
Is this in GitHib yet?
Hi Guys, I pulled the latest GitHub today, and created a jqGrid thus:
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top