1

I own a jqgrid dialogbox for managing users which I am able to add or edit the users attributes.

But I came to the conclusion that the users infos should be devided into two seprate parts , public and advanced.

Now , at this juncture when i want to add or edit a user , the dialog box which is being opened for editing and adding the user, should contain two tabs , advanced and general

At last , how should one be able to add tabs in jqgrid user management dialogbox?

I have seen content in below links but there were no answer.

jqgrid-customize-modal-popup.

customizing-view-modal-popup-in-jqgrid

Thanks in advance.

Community
  • 1
  • 1
Aria
  • 3,724
  • 1
  • 20
  • 51

1 Answers1

0

I find your question interesting, but you should not expect a simple solution. There are many reasons why no simple solution exist.

First of all jqGrid is jQuery plugin and not jQuery UI Widget. It uses just jQuery UI CSS Framework. So jqGrid uses no jQuery Widgets like Tabs, Dialog, Button, Tooltips, Datepicker, Autocomplete and so on. Even Effects or Position utility will be not used. One can integrate jqGrid in solutions which uses the Widgets, but it don't uses there internally.

The second reason: the structure of editing forms of jqGrid is table oriented. The function getFormData used by jqGrid internally for getting the results of form editing uses table oriented selectors (see the line and the line)

$("#"+"TblGrid_"+$.jgrid.jqID($t.p.id)+">tbody>tr>td>.FormElement").each(function() {

So you can't just move some input elements in another tab inside of afterShowForm callback for example. In the case getFormData will work incorrectly and no editing results will be send to the server.

What you can do pragmatically instead is the usage of grouping of data by interesting additional information in the form. See the answer for more details.

Another way would be the usage of colpos and rowpos properties of formoptions. See the answer for details.

You can of case combine both from above mentioned approaches.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798
  • First of all i should thank you for your rich and advance response ,We can see that you are always answering to all jqgrid questions It’s not good that we can’t add tab to editing form but your answer in below link is good for separating inputs in difference group. [a link](http://stackoverflow.com/questions/9998125/jqgrid-grouping-fields-in-edit-form/10020340#10020340) Hence I can use that. Thank u very much again. – Aria Jun 15 '13 at 11:49