If you just want a horizontal scroller then forget the scroll option and just do this:
autowidth:true,
shrinkToFit:false,
forceFit:true,
Another solution is to put the whole grid within a scrollable div
I can confirm this.
Some standard navbar icons are not working when upgrading jQuery to 1.8.0. This is with jqGrid
I worked it out.
Needed to use the importComplete option:
Thank you Tony. That works.
FF 2.0 doesn’t seem to work well with the grid.
Mozilla are discontinuing support for FF2. There will be a release 2.0.0.19 but after that they advise to update to version 3.
Version 3.1 is in beta but will be final soon. This version does background javascript processing which is supposed to speed up javascript apps quite significantly.
Chris,
one gotcha is when cut and pasting code from this type of board. The quotes do not paste correctly so make sure after you paste the code you overwrite single and double quotes with the correct chars from your keyboard.
Tony, I found the getColProp function in the docs. This sort of gives me what I want but you have to name each column – you can not get info on all the columns.
This does not work:
*********************
gridParams = JSON.stringify($(â€#a_allâ€).getColProp());
*********************
So I have to do this
*********************
gridParams1 = JSON.stringify($(â€#a_allâ€).getColProp(â€idâ€));
gridParams2 = JSON.stringify($(â€#a_allâ€).getColProp(â€nameâ€));
gridParams3 = JSON.stringify($(â€#a_allâ€).getColProp(â€dateâ€));
*********************
Note too that I think there is a problem with the column widths not being updated.
I have a column name and if I look at the properties it shows:
*********************
{â€nameâ€:â€nameâ€,â€indexâ€:â€nameâ€,â€widthâ€:160,â€editableâ€:true,â€edittypeâ€:â€textâ€,â€editoptionsâ€:{â€sizeâ€:â€75″,â€maxlengthâ€:â€250″},â€resizableâ€:true}
*********************
That’s fine. Now if I use the hide/show column feature to remove this from the grid it shows:
*********************
{â€nameâ€:â€nameâ€,â€indexâ€:â€nameâ€,â€widthâ€:160,â€editableâ€:true,â€edittypeâ€:â€textâ€,â€editoptionsâ€:{â€sizeâ€:â€75″,â€maxlengthâ€:â€250″},â€resizableâ€:true,â€hiddenâ€:true}
*********************
That is fine too as it is correctly stating that the column is now hidden.
But if I show the column and adjust the width manually (by dragging the separator bar) then the change is not being shown. If I drag / shrink / expand the name column on screen the width is always showing as
*********************
“widthâ€:160
*********************
Should not this change as I change the column width on screen?
Thanks for the pointers tony. I am now using JSON.stringify to convert the js object into text.
*********************
loadComplete: function() {
jQuery(‘#a_all’).setSelection(‘1’);
gridParam = JSON.stringify($(“#a_all”).getGridParam());
alert(gridParam);
}
*********************
What that does is alert a huge text file of all the grid settings. Is it possible to just get the settings for the columns?
The documentation only shows selective options for
“urlâ€
“sortnameâ€
“sortorderâ€
“selrowâ€
“pageâ€
“rowNumâ€
“datatypeâ€
“recordsâ€
“selarrowâ€
tony is there any progress on this?
In the meantime how can I save and load the grid parameters for just the columns?
I am using the setcolumns js which works great but the info is lost when the page is reloaded. I am also changing the column widths but this info is also lost on page reload.
what getgridparam do I need to use to get that info?
currently the documentation only shows:
“urlâ€
“sortnameâ€
“sortorderâ€
“selrowâ€
“pageâ€
“rowNumâ€
“datatypeâ€
“recordsâ€
“selarrowâ€
So that is a catch 22 situation for grids which are not meant for editing.
* If I disable formedit I can not use the navigator.
* If I enable formedit but disable the edit icon it generates an error message.
I guess I will have to leave the edit icon in place and make all fields edit:false
Cheers.
Thanks Tony I will check it out.
On a related theme I think there is a problem with include false: for formedit.
For testing I set this to false but on the non editable grid I then lose the toolbar icons.
This grid just has search and reload but setting the include formedit to false removes the icons and produces an object doesn’t support this property error.
Here’s the nav bar icons.
*******************************
.navGrid(â€#pager_todayâ€,{refresh:true,edit:false,add:false,del:false,search:true},
{}, // edit options
{}, // del options
{}, // add options
{width:450,Find:â€Searchâ€,sopt:} // search options
);
*******************************
still no good sorry tony
Tony I could not get the jquery popup feature to work.
Have now reverted to basics and have a solution using plain javascript window open.
In the json string I now have:
*****************
$time = ‘[a href=”#” onclick=”javascript:window.open(\’/data/’ . trim($row<a href=") . ‘.php\’,\’popup\’,\’width=400,height=200\’);â€]’ . trim($row[time]) . ‘[/a]‘;
*****************
This works fine.
Cheers.” class=”bbcode_url”>) . ‘.php\’,\’popup\’,\’width=400,height=200\’);â€]’ . trim($row[time]) . ‘[/a]‘;
*****************
This works fine.
Cheers.
I could not get that to work Tony.
Once again the font size changes but the color stays whatever the cell is set at. Tried in FF and IE.
Cheers.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top