Hi Tony,
Ok, worked out how to handle this problem and still show my image and still have dynamic scrolling. Originally I had multi-line rows but the height of rows was different because some some rows have an image and some don't. I simply amended the css for the row to be a fixed height.
.ui-jqgrid tr.jqgrow td.wrap {
Hi Tony,
I don't think is this a problem from the server. In my grid I have multi-line rows and from what I can gather at /blog/?page_id=393/help/multiline-rows-breaks-dynamic-scrolling-grids/&value=multiple%20lines&type=3&include=1&search=1 This appears to break dynamic scrolling (scroll:1). When I make my grid only single lines per row it then I didn't get any negative row/record numbers.
One of the main things I need to do in my app is display an image in one of the grid columns (I have a custom formatter that displays it) but this of course causes the grid to have multi-line rows.
I looked at the list of changes you did for 3.6.5 but I didn't see this issue mentioned. I really like the dynamic scroll and would love to be able to use it. I've used it on all my other grids in my application and would love to use it in this one with the mult-line rows to keep everything the same for the user.
Is this still a problem or is there a work-around you can think of?
Regards,
Simon
Hi Tony,
I am now making use of gridComplete as you suggested. As part of my grid definition I have the following:
Hi Tony,
I have an issue that is is related to Will's . I have used the column chooser plugin so the user can choose their column arrangement i.e. which columns are to be visible and in what order. I store the columns the user chose in a cookie and in the order that the user chose in the columnChooser.
When the page is refreshed and the grid is reloaded I hide all columns in the grid, read the cookie and loop through the columns stored in the cookie and make them visible in the grid by calling $(#mygrid).jqGrid(“showCol”, Cols).
This does indeed make the correct columns visible, but in the order defined in colModel, not in the order the user chose, i.e. the order they were read from the cookie.
Is there a way to make the columns appear in a given order?
Regards,
Simon
Thanks Tony, I hadn't read this, the mistake I made was defining the column choose as follows:
Thanks Tony, all the columns that should be there now appear in the drop down. I shall now put my other code back and see if everything still works.
Thanks again,
Simon
Hi Tony,
I'm now using the jquery.jqgrid.min (3.6.1) I picked every option for download. But when I click on the column chooser button firebug gives me the error 'G is undefined'.
This is my grid definition:
Hi Tony,
I tried your suggestion but I'm still having trouble. I've stripped down the definition of my grid to try and work out what the problem is. I can reproduce the problem behaviour every time.
Using my downloaded version of jquery.jqrid.min.js (3.5.3). If I select advanced search, then the drop down list of columns shows all the columns in the grid definintion. Issuing my search runs correctly and the correct rows are returned.
If I then simply substitute the 3.5.3 version of jquery.jqrid.min.js for the 3.6.1 version then when I choose advanced search the drop down list of columns only contains columns that are visible in the grid, not all the columns where search: true is set.
In both cases the search works correctly, and no errors are displayed in firebug.
Hi Tony,
I'm also having trouble with column chooser. When I click on the column chooser button I get the error “G is not defined”. When I downloaded 3.6.1 I chose everything. I'm not using the minified version (jquery.jqgrid.min.js) I'm using the loader. Here are the modules I'm loading:
Hi Tony,
Sorry I should have posted the code previously – difficult to help me if you can't see what I'm doing.
This is the code:
Thanks Tony, I've downloaded 3.6.1 and I can now set my custom formatters as defaults, thanks again.
Also, is it possible to set columns as defaults. I have two columns (the edit and delete button columns described above) that appear on every grid in my application. I've quickly tried using
…
$.extend($.jgrid.defaults, {
Thanks Tony, I will download 3.6.1 tomorrow and give it a try, thanks again for you quick response.
Regards,
Simon
Thank you Tony and Mark for your replies. A combination of your two solutions does help. the editButtonFormatter function is at least now being called, but there seem to still be soome issues. Originally when I called the editButtonFormatter by just adding the function to my code without going dow the $.fn.fmatter.editButtonFormatter route the cellValue parameter was undefined,
the options parameter held values of the colModel etc and rowObject held the values of the other columns on the row. I'm using a value in the rowObject to pick out a particular column value so rowObject is important to me.
However, when I define the editButtonFormatter via $.fn.fmatter.editButtonFormatter and wrap it in quotes in the colModel. Then when editButtonFormatter is called the cellvalue parameter is undefined, the options parameter does hold the colModel details but the rowObject contains “add” and not the values of the other columns in the row. So there do still appear to be some problems.
Is there anything else I should try?
Regards,
Simon
Hi Tony,
I tried you suggestion but unfortunately I still get the error.
My code …
Hi Tony,
Yes thats how I call it in my grid code:
colModel[
{
…
name: 'editLink', search: false, sortable: false, hidden: false, index: 'editLink', width: 20, align: 'center', formatter: editButtonFormatter },
…
]
But this causes the “editButtonFormatterfuntion is not defined” error.
When I was creating the function initially I just added a function underneath my grid code like so:
|
1 |
<span class="sy0"><br /></span>function editButtonFormatter (cellvalue, options, rowObject) {<br /> |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top