0

in jqgrid am showing person name as "Firstname + Lastname" in a single column. but when i click on edit it will become one input field but i want it to be two inputs field one for firstname and other one for lastname.

for example: take any jqgrid table and assume there is one more column "name" having values like "Rahul garg", "Jack oberoi", "Gordon Linoff".. when i edit it it will be like

<input type="text" class="formelement" name="name" value="Rahul garg">

but i wanted it to be like

<input type="text" class="formelement" name="first_name" value="Rahul"> <input type="text" class="formelement" name="last_name" value="garg">

Pritam Jinal
  • 121
  • 9
  • Please be more specific and clear what you want to be done. And also let us know what have you done yet – Nehal Jan 06 '16 at 06:54
  • for example take any jqgrid table and assume there is one more column "name" having values like "Rahul garg", "Jack oberoi", "Gordon Linoff".. when i edit it it will be like
    but i wanted it to be like
    
     
    – Pritam Jinal Jan 06 '16 at 07:06
  • 1
    @PritamJinal: Look at [the old answer](http://stackoverflow.com/a/3055626/315935), which seems to me the exact answer on your question. It you would still have some questions opened I could try to help you. It could be important how you hold the data for `last_name` and `first_name`. You can hold both fields separately and just *display* composite (virtual) full name based on `last_name` and `first_name`. During editing you modify the first and the last name and the column formatter will just display new composite full name fter finishing of editing. – Oleg Jan 06 '16 at 11:25
  • yes thats solves my problem... am holding both fields as hidden and showing composite full name... thanks.. – Pritam Jinal Jan 06 '16 at 12:16

0 Answers0