Maggie, can you post your findings here so others can learn from it? 🙂
Thanks
here is how:
$(“#grid”)[0].p.colModel
Hi Tony,
Thanks for the suggestion to use editoptions key->value. I can then reverse lookup the key if I want by referencing that array.
I'll try that and see how I can make it work.
Thanks!
I asked that question here:
I haven't heard back from Tony on how to do this.
In the meant time I may resort to using the standard jquery functionality of grabbing the value using the val() function if there isn't one built into jqGrid. I think the name of the cell id for that row is “rowid_cellname” but haven't verified that yet with FireBug.
That would be my advice until we hear back if there is another way.
My mistake, I'm sorry for the confusion.
I did mean this happens with Cell Editing (as per my example code).
Please see this post then:
http://www.trirand.com/blog/?page_id=18/help/navgrid-in-footer-and-header/page-1
Yes.
Add a toolbar anchored to the top and a pager anchored to the bottom.
The examples show code for both of these. Just combine them and you should be good to go.
Hi Tony,
Thanks for the reply.
I think that's my question, how can I set the value of both the value and the key for an edittype select?
And then once it is set, how can I retreive (for any of the rows) both the value and the key for the same field?
I would like to perform a calculation using the key(value) and display the label.
I have successfully used the new formatter and can set a key and it shows the label but haven't been able to set both or obtain both values as I would like.
Thanks!
Awesome, the bug fix worked great!
Thanks for your support!
This is a great grid! 🙂
Another easy one!
To get all the column names just parse the row array from getRowData like this:
row_array = getRowData(anyrowid);
for ( var column in row_array)
Easy, just fill a variable with all blanks then append using addRowData.
You may want to use getDataIDs to obtain the last rowid.
var datarow = {id:'',…..(all your columns here)};
var su=jQuery(“#grid”).addRowData(lastrowid+1,datarow);
bump!
Try to use the function:
afterSaveCell: function(rowid, cellname, value, iRow, iCol)
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top