Forum
23:37
06/06/2011
Hii, in the documentation it seems that a single colModel property ("editable") specifies if a column must be present in the add panel and the edit panel , but in large number of cases colmuns that I can set in an "add" operation must be not modifiable in "edit" mode (i.e. primary keys, Is there a way to obtain this behaviour?
Thanks
18:45
06/08/2011
r.cappa said:
Hii, in the documentation it seems that a single colModel property ("editable") specifies if a column must be present in the add panel and the edit panel , but in large number of cases colmuns that I can set in an "add" operation must be not modifiable in "edit" mode (i.e. primary keys, Is there a way to obtain this behaviour?
Thanks
If you haven't already found a solution this might help:
19:04
06/06/2011
JerryOfPerth said:
r.cappa said:
Hii, in the documentation it seems that a single colModel property ("editable") specifies if a column must be present in the add panel and the edit panel , but in large number of cases colmuns that I can set in an "add" operation must be not modifiable in "edit" mode (i.e. primary keys, Is there a way to obtain this behaviour?
Thanks
If you haven't already found a solution this might help:
I've already found this, but it is a workaround. It is not a good way, and not so much intuitive, manually hide unused fields in beforeshow event. It can be useful to configure this in a declarative mode.
19:54
10/08/2009
Hello r.cappa and JerryOfPerth,
Thank for the posting. I agree that the requirement to have some fields visible and editable in Add, but not in Edit dialog is a common requirement. jqGrid has some events like afterShowForm, beforeShowForm, beforeSubmit, serializeEditData which can be used to do almost any changes in the form dialog, the editurl or in the data which will be send. Nevertheless some standard actions could be made more easy to use.
If Tony would read the topic it would write my opinion on the subject.
I think it would be very nice to allow the editable property be not only boolean with the data true and false, but to be a string with values like "add", "edit", "add, delete", "add, edit, delete" or something like that. One can instead of that introduce additional property inside of the editoptions which described which edit operation are permitted on the column.
One another close requirement which I see sometime is the requirement to send some grid fields to the server together with the editable fields. Curently there are exist a tricky possibility to define hidden column like
to send the data from the column to the server. It's difficult to read and understand. Moreover sometime one needs to send the value of some visible, but not editable column from the grid as the part of the Add/Edit operartion. Not only rowid can be important to for edit operation.
The new property/properties of editoption with some clear name like sendOnEdit, sendOnAdd, sendOnDel could be introduced, which can be used to declare that the field (either hidden or non-hidden non-editable columns) should be send during the corresponding edit operation.
The last suggestion is to define how editurl should be appended. If one uses RESTfull services on the server side the appending of rowid to editurl in Edit or Delete operartion should be implemented. Currently one can use onclickSubmit or beforeSubmit in form editing to modify imediately befor the Ajax requests. In case of inline editing one could construct the url which one needs and use if as the parameter of editRow or saveRow. In case the usage inline editing indirect as the formatter:'actions' the modifying of url could be a little more sofisticated.
A simple in use and in the implementation could be new editUrlTemplate option with the value in the form like "/{id}/{col1Name}" which could define the string which will be appended to the editurl. The values like {id} and {id}/{col1Name} where col1Name is the name property of some column from colModel could be replaced to the corresponding value from the row field. The parameter could be very easy to understand and for the implementation one should just parse the template for the {} and use encodeURIComponent JavaScript function to encode the value from the corresponding column.
I think that such changes in the jqGrid would be very usefull and there are easy to implement.
Best regards
Oleg
Most Users Ever Online: 715
Currently Online:
54 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66