So for now, I put the following in my loadComplete function:
$(“#alertmod”).remove ();
which seems to have solved the issue.
Actually, after further reading, it's not a method it's simply a class (i.e. class='disableSelection').
So this worked a little better.
The other part that is odd is the actual column drag span.
So I decided it would be “fun” (yah, fun in a sick sort of way) to try and implement this.
I think these are all very good ideas but tread carefully.
Having programmed in Java for over 10 years, I can tell you that using this in a JSP is no different than using it in PHP (from a logical point of view).
Should I grab the code from GIT?
So when a row is edited, and if you use FormToGrid, the following gets passed into the custom formatter as the rowObject:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<div class="sfcode">rowObject: Object<br /> constructor: function Object()<br /> parentId:<br /> attachmentCount: 1<br /> description: Testing.<br /> id: 1<br /> priority: Low<br /> priorityId: 1<br /> projectId: 1<br /> status: Closed<br /> statusId: 2<br /> title: Create Baseline Database Schema<br /> userId: 1<br /> username: admin<br /> __proto__: Object<br /> </div><br /> |
These mapped to my form exactly; i.e. I have a hidden input with an id of 'description' and 'attachmentCount' etc.
FYI:
Ok, so I was playing with this today because I have a treegrid that has items which “may” contain attachments.
Well, you could do something like this:
|
1 2 3 4 5 6 7 |
<div class="sfcode"><br /> function customFormatter (cellValue, options, rowObject) {<br /> // alert (cellValue);<br /> return "<span style="background: red">" + cellValue + "</span>";<br /> }<br /> <br /> </div> |
I ran the Chrome Javascript debugger on a custom formatter because the wiki didn't seem to be correct about what gets passed as the third parameter (i.e. rowObject).
And do you want jqGrid to manage it all for you or are you trying to do the complete form, validation, etc. by yourself?
Help you what, create a dialog?
Well, I plowed my way through the code and decided that, for now, the best way I could insert a new button into the title bar is as follows:
|
1 |
<p>temp = $("<a href="'#'" role="'link'" rel="nofollow"></a>")</p><p>.addClass('ui-jqgrid-titlebar-close HeaderButton')</p><p>.hover(</p><p>function() {$(this).addClass('ui-state-hover');},</p><p>function() {$(this).removeClass('ui-state-hover');}</p><p>).append ("<span class="'ui-icon"></span>");</p><p>$('.ui-jqgrid-title').before (temp);</p> |
I haven't started adding a function to this new button, but it's going to be a close button because I made the jqGrid movable like a dialog.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top