title: Change the Sequence of JqGrid Columns
body: <p>I wanted to change the grid column sequence dynamically. For e.g. By default the grid will be loaded in LoginId, FirstName and LastName sequence. Based on some condition, I need to change the FirstName and LastName sequence.</p>
  
  <p>Is there any way I can do this?</p>
  
  <p>I tried doing like:</p>
  
  <pre><code>{name:'UserName',index:'UserName',width:82,sortable:false},
  if(true)
  {
     {name:'FirstName',index:'FirstName',width:65,sortable:false},
     {name:'LastName',index:'LastName',width:65,sortable:false},
  }
  else
  {
     {name:'LastName',index:'LastName',width:65,sortable:false},
     {name:'FirstName',index:'FirstName',width:65,sortable:false},   
  }
  </code></pre>
  
  <p>but I could not get this work.</p>