Stack0verflow
Stack0verflow

Reputation: 1178

How to toggle Edit and Save Cancel in a jqGrid?

I asked this question at jquery forum cf: my question, but was asked to come here and look for Oleg.

I've done a lot of research online and tested a bunch of code either mine or from the web, but so far have had no luck. I keep on reading that I need to use the oneditfunc function. As you see in my question at the jquery forum, I added those action buttons in gridComplete. Where do I declare and define the oneditfunc function?

The example at http://www.ok-soft-gmbh.com/jqGrid/ActionButtons.htm does look like what I am looking for, but I can't use the pre-defined 'actions' formatter, I have to use buttons which bear the texts Edit, Save and Cancel.

There is an example at http://www.trirand.com/blog/jqgrid/jqgrid.html# under Row Editing (new) > Custom Edit, which I followed to create mine you've seen in my original question at jquery forum. Unfortunately, those buttons don't toggle.

It just doesn't make sense to display the S(ave) and C(ancel) buttons when the rows are not even in edit mode. So I do want to fix this by toggling them. Any ideas to share? I am sure this is going to help a lot of people as no working examples can be found online. Thank you!

Upvotes: 2

Views: 1659

Answers (1)

Stack0verflow
Stack0verflow

Reputation: 1178

For those who are looking to solve this problem. I have solve it and I have posted my solution at http://forum.jquery.com/topic/jqgrid-inline-editing-buttons .

Upvotes: 1

Related Questions