jqgrid Locking Up when paging or rowlist - jqgrid

We're finding that jqgrid locks up sometimes...particularly when using the Row List drop down. The data (XML) does come back from the server, I can see it in the GET, but jqgrid on the page doesn't refresh...then, most times, it locks up completely and the full page must be refreshed. I've found this happens no matter the dataset size (same thing happens with 100 rows as it does with 3000), no matter the browser, and on most of our grids I've tested.
Any hints on what to look for?
Should I be looking into overriding the default refresh that happens when row list is changed? something like is done here with the Refresh button override:
Olegs Answer
and if so, how would I do that???

After going through my Grid configuration, my HTML and such...I found that I had one broken XML element in the response. This broken XML was a bug in MY code, which always happened at exactly 2 MB of XML output. I traced this back to the server XML response, fixed the output, and now that the XML if proper the grid is paging nicely.
So, if you notice this kind of thing happening, first CDATA your XML, then check for any broken XML.

Related

suggestion where to look to find why my report has extra blank pages

I am on Msoft SQL Server Report Builder, v15.0
I have a multi page report that no matter that forces a blank page every 2nd page.
I have searched through the tablix properties, report properties, header & footer properties and have not found a culprit yet.
I fear that there are somehow some hidden pieces that are causing this issue, but I do not know how to be able to see the hidden pieces.
I have opened the .rdl file up in notepad++ and started walking through the code, but I am not certain where I should look at in there that would cause my problem.
It is a 10 column report that is generated from a dataset culled down, but the report has 3 calculated fields in it, including a column which generates a ranking number.
If you know of a explicit piece of code I should search for that would be awesome, but I know that is a needle in a snowpile.....
Found finally what I had done...
my durn body was the same width as the page sheet so it was pushing the margins off and creating a new page.
Here is a good walk through of what I found.....
http://www.keepitsimpleandfast.com/2009/12/export-of-reporting-server-reports-to.html

How to write <table> markup without JSF tag libraries (h:datatable or ui:repeat) but still use JSF for controlling page flow

I have various tables with the following size : 12 columns and up to 1800 rows. It takes 8 seconds to render it to the user. I currently use h:dataTable. I tried ui:repeat to get the row data from a Java List object, managed by JSF. Although this works fine, the 8 seconds to render the table is unacceptable. I'm trying to find other ways to do this, but need to keep JSF as my controller for action buttons on the page. In other words I want to create the 'table markupto send to thepage myselfand then still associate actions onh:commandButtons` to the managed bean methods. Is there a way to do this?
The only ways I can think of is to use jquery or ajax to create the table markup, although I am new to technologies other than JSF for UI development.Maybe then I would somehow pass that to the client for render. The only problem is I don't know how to generate the markup from my list, and second how I would inject it between h:commandButtons that are in my XHTML file currently.
Does any one know how I can solve this without having to completely rip OFF JSF? One main problem I have is that the business requirement that says we can't page the datatable (i.e: Next / Back buttons displaying 100 at a time for example). So, possibly I was thinking I could do this by Ajax calls to the server and get 100 rows at a time after page ready, and append new rows behind the scenes to the user. This would be a "perceived" speed of load, but I don't know how to do this at all.
8 seconds isn't bad for a whopping 1800 rows on 12 columns. 10~100 rows is done in less than a second, right?
Before continuing with this, are you absolutely positive that all those 1800 rows are supposed to be shown at once? Isn't this very user unfriendly? Wouldn't the user have to need Ctrl+F to find the information it is looking for? Isn't that annoying? Why don't you introduce filtering (a search field) and pagination exactly like as Google is doing to present the zillion of results in a sane and user friendly manner?
Anyway, you could consider using "On-Demand data" option of PrimeFaces <p:dataTable>, wherein the data is loaded by ajax during scrolling via <p:dataTable liveScroll="true">. See also the showcase example. No homegrown code nor manually fiddling with jQuery necessary. PrimeFaces has done it all under the covers.
It you don't want to use PrimeFaces for some reason, then you could consider using OmniFaces <o:componentIdParam> in combination with some jQuery "live scrolling" plugin. See also the last example in its (snapshot) showcase page for a kickoff example (which should easily be adapted to be triggered by hitting the scroll bottom instead of by clicking).

jqgrid click local data column sort (client-side only) wipes userData on grid refresh

I have a grid that is populated by a JSON response (MVC3 controller) that has a userData component for some additional data for grid captions, etc. All that works just fine. I recently switched the the grid's data loading to "loadonce: true" as in working with larger grid results sets, I wanted client-side sorting and filtering. All that works good. BUT, I was surprised that the userData got wiped the first time I clicked any column for sorting. If I turn off loadonce, userData is fine, but it is of course going back to the server each time. The items that make use of the userData fire on gridcomplete and are now coming back "undefined" after a sort (and probably anything that reloads the grid). Any thoughts why this might be happening? Oh yeah, I also noticed that clicking a column sort wiped out any multiselections (perhaps related to the same culprit?).
Thanks,
Mark
You are right. +1 from me. It's a jqGrid bug. Inside of internal addLocalData method after the line 1527 of the file grid.base.js of jqGrid 4.1.2 or after the 1532 of jquery.jqGrid.src.js (you can get modified version from here) one should add the following line
retresult[ts.p.localReader.userdata] = ts.p.userData;
It will fix the problem. I posted the corresponding bug report here.

Why do jqgrid, flexigrid and ingrid all use separate tables for the header and data?

We're using jqgrid on a web application to render the results of searches because of its built in functionality for paging and sorting that executes server side. We were previously using Tablesorter, but that operated client side and so didn't work well for how we were trying to use it.
We had a web designer on the project (whom has since left the organisation) that had created styles for tables and tried to get the same look working on the jqgrid. It sort of worked, but not quite. We have trouble with the header columns being unaligned with the data columns. We've fiddled with the CSS but it just doesn't seem to work. Sometimes we get scroll bars appearing when we don't want them.
Anyway, part of the problem seems to be that jqgrid uses one table for the column headers, and then another for the data itself. These tables are each wrapped in a div tag. We've had a look at some of the alternatives such as Flexigrid and Ingrid but they also use the same approach with separate tables for the headers and data.
It would be great if someone could explain why this approach is used. We were wondering why a standard table tag with a row of th for the headers and td for the data couldn't be used instead?
The reason these plugins use separate tables for headers and data is to allow for fixed header scrolling. As far as I know you cannot have headers and data in the same table, yet fix the headers to the top during scrolling.
Also for your alignment issue, if possible, I believe these plugins all have settings where you can set how wide you want each column, and this will make the data and header columns line up properly.

BIRT produces empty first page

After upgrading BIRT from version 2.3.2 to 2.6.1, some reports have started producing empty first pages. I've checked the source XML of the rptdesign and the referenced rptlibrary and verified that ALL settings of page break properties are set to "auto". I.e. there are no forced page breaks anywhere in the report definition. The first page contains the master page header/footer items but no data.
Being a relative newbie to BIRT I'm not sure where to go next to solve (or even debug) this problem. My Google-fu turns up some old BIRT bugs (2.1 timeframe) relating to empty first pages but they were resolved long ago.
Can someone suggest how debug this?
First Page
Second Page
I have identified the source of the problem. When this report was
originally designed (long before my time) a grid was used to effect some
padding around the outside of the content. At the top level of the
design (in the body) is a 3x3 grid with skinny top and bottom rows and
left and right columns, with all content going in the center cell.
body
grid
column1 width=2%
column2 width=96%
column3 width=2%
row1 (empty)
row2
table with all report content
row3 (empty)
All the border cells are empty, and if I completely remove the grid and
place the content table in the body directly, there is no initial page
break.
body
table with all report content
So the bug appears to occur if the content, which is larger than a
single output page, is inside a grid. In this case, the normal
suppression of the page break before the first page does not seem to
function.
It's not clear if this is a bug or a design decision, so I have asked
on the Eclipse community forums if this behavior is expected. I will
update this answer when I get a definitive reply.
EDIT: Looks like a BIRT Bug
EDIT: For us, an acceptable workaround is to simply delete the first row in the grid, which consisted of only empty cells anyway. If the too-large section occurs in the (now) first row, the spurious page-break disappears.
This happened for us when we were including svg - images in Birt. Removing them in the XML - document fixed the Problem. Interestingly this only happens with specific svg - images and not with all of them...

Resources