Author Topic: showLoading?  (Read 4996 times)

MatsP

  • Pro Economy
  • Newbie
  • *
  • Posts: 12
    • View Profile
showLoading?
« on: November 19, 2013, 03:12:10 am »
How do I get the showLoading to work when the grid is loading the data the first time?
Right now it says "No rows to display" and after a second or two, the data shows.
However, when refreshing the grid after a cellsave, it pops up "Loading".

I am not using showLoading anywhere, so why does it work with refresh, but not on the initial load?

v. 2.0.3 on its way soon?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: showLoading?
« Reply #1 on: November 19, 2013, 08:26:35 pm »
MatsP

Can you please show me this issue in any of the demos. Is it browser specific?

Yes next version is coming soon!


MatsP

  • Pro Economy
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: showLoading?
« Reply #2 on: November 20, 2013, 04:39:46 pm »
It's not browser specific, it's something else.

I made my own localization (Swedish) file, based on one of the included localization files.
After the initalization of the grid I run this code:
grid.pqGrid("option", $.paramquery.pqGrid.regional['se']);

The showLoading is not showing, only this "No rows to display" shows and in English as well.
If I remove this row:
grid.pqGrid("option", $.paramquery.pqGrid.regional['se']);
...then the showLoading is showing, but in English of course. If I keep that row, the showLoading is only showing when calling refresh, but in Swedish (so I know the localization file is correct).

I want showLoading to show when initalizating the grid and in the language I chosen.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6307
    • View Profile
Re: showLoading?
« Reply #3 on: November 21, 2013, 11:04:00 am »
Confirmed an issue with Loading regional string if done as shown in the demo.

You can use alternative way to regionalize the grid strings before initialization of the grid:

Code: [Select]
var gridObj = {
  height: 400,
  width: 600,
  dataModel: DM,
  colModlel: CM,
  ..
}

$.extend(gridObj, $.paramquery.pqGrid.regional[locale]);       

$(" selector ").pqGrid(gridObj);

And the key name for No records is strNoRows which you can add to your regional Swedish file.

Code: [Select]
strNoRows: "No rows to display.",       

 
« Last Edit: November 21, 2013, 02:09:59 pm by paramquery »