Is it possible to display two editable text boxes in one cell of the JqGrid
-
2You should describe what you want more detailed. Which [editing mode](http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs#editing) you use? Why you need two input fields during editing of one cell? How the two fields should be initialized? How the results of editing should be saved in the cell?... – Oleg May 09 '12 at 12:36
-
In the grid one column is created dynamically by getting information from an xml. Depending on the xml data sometimes I need to display two text boxes in a cell(I cant use two columns for that). And also in that column(different rows) I need to display different components(text box, check box, text area). – Knissanka May 14 '12 at 07:18
2 Answers
Sorry, but the description of the problem in the comment to your question still don't contain any examples which shows why you have to display two text boxes in one cell. Moreover you still not answered on the question: which editing mode you use?
The problem is the following: if you use some software product you can use a lot of its standard features. In the case the implementation will be short and you can make very nice solution writing very small code. If you one the other side would try just follow your original imagination of how all should looks like you can spend many time and to write a lot of code. As the result from the point of view of the user who will work with your site all will be almost the same as in the simple solution. Is it really required?
If you would use form editing for example you can easy display additional textboxes, checkboxes or textareas from hidden columns. jqGrid automatically create controls for all hidden columns which have editable: true
property. So what you need to do in the case is just to show hidden field in the form with respect of $.show
(like in the answer).
-
Thanks for the comment: I have find a way to display more than one HTML component in a cell in JQgrid. – Knissanka May 18 '12 at 04:58
-
I used the same concept in "http://www.trirand.com/blog/jqgrid/jqgrid.html#" There in the Row editing --> Custom edit JqGrid demo its displaying three buttons on a one cell. – Knissanka May 18 '12 at 05:17
-
@Knissanka: in the "custom edit" demo will be displayed buttons and not input boxes in one cell. The demo is very old. One can implement the same easier using `formatter: "actions"`. I still not understand what you want to do. If you want that other understand what you want you should edit your answer and **explain your requirements more detailed**. – Oleg May 18 '12 at 08:22
I used the same concept in "trirand.com/blog/jqgrid/jqgrid.html#"; There in the Row editing --> Custom edit, JqGrid demo examples, its displaying three buttons on a one cell.

- 207
- 1
- 3
- 12