Hi mdsoneta,
You can use a custom formatter and spit out the html for an <a href="… etc. depending on the value Y or N
Cheers,
Michael
Thanks Tony,
Hi There,
I think that you need to set dataType to “json” (rather than “local”) in your ajax call.
Other than that, perhaps the url …
|
1 |
|
1 |
../webServices/myTestWS.asmx/testMethod |
… is incorrect (ie. using ../ at the front might not be finding it correctly).
Hi Nathan,
I think you need to change …
mygrid.addJSONData(data)
… to …
mygrid.addJSONData(data.d)
I hope that works!
Cheers,
Michael
Hi Reg,
I can't answer your question because I don't use 3.7 yet, but I would suggest to use Firefox and use the Firebug plugin if you need to find out the names of elements.
Its extreemly useful for debugging javascript problems etc. as well.
I hope that helps
Cheers,
Michael
Thanks Tony,
Thats a much nicer solution 
Hi pmx,
I'm not 100% sure (i havn't seen it set up like this before) but i think it could be the way you set up subGridModel …
Thanks riverguardian
Hi there,
I will soon try to replace the tooltips on cell's in the following manner – it may or may not work, but if it does work you could use the same technique …
1) make a custom formatter for the column, which will insert a hidden field with a known class name into each cell
2) once the grid is loaded, i'll search for all these hidden fields ( $(.clsHiddenField)) and iterate through them grabbing they're parent (ie. the cell)
3) set the cell's title attribute to whatever i like (you could set other attributes such as background colour etc.)
If anyone reading this has a nicer solution to setting the cell's tooltip please let me know 
I hope this helps
Cheers,
Michael
Hi Mikesmith,
Sorry I didn't mean to imply that I have a solution for saving when the enter key is pressed if the textbox doesn't have focus – my solution was to save when the user clicks the mouse on another cell instead of hitting the enter key.
I believe that you can solve your datepicker problem by handling the onClose event of the datepicker and calling the javascript focus() method on the textbox inside this event.
I am also using inline edit, and the enter key also only works when the cursor is in a textbox.
I guess the reason for this is that hitting the enter key fires an event on whatever has focus – for example if your grid is in inline edit mode, but some hyperlink outside your grid has focus, then hitting the enter key will click the hyperlink (not affecting your grid, or its inline edit functionality)
The way I deal with this is to handle the cell click event – if a non-editable cell in the same row or a different row is clicked, then save the row. If an editable cell in another row is clicked, then i first save the row and open up the second row for inline edit.
Hi DaElectric,
Thanks for your reply and solution.
Hi Zenixgrace,
I'm not sure to be honest, but i do know that the width returned will be the current width after resizing the columns.
Hi zenixgrace,
I believe that this code is what you want …
var a = $(“#tableGrid”).jqGrid('getGridParam','colModel');
alert(a[0].name);
alert(a[0].width);
alert(a[1].name);
alert(a[1].width);
etc.
Cheers,
Michael
Hi Tony,
Thanks for the reply.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top