Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I was having the same issue, I solved this issue by appending 4 lines of code in <code>gridComplete</code>, these 4 lines will change the style of <code>td</code>'s of content area [first row <code>td</code>'s style modification is enough]. </p> <p>This is an issue in jqgid, which is actually setting the <code>td</code>'s inside the <code>&lt;thead&gt;</code> but this style is not reflecting in the <code>td</code>'s of content area. While developing jqgrid they assumed that entire columns width will be effected by changing widths of one row's <code>td</code>s but they only changed for <code>&lt;thead&gt;</code> which is the persisting issue here.</p> <p>Set column widths in the <code>colModel</code>:</p> <pre><code>colModel: [ { name: 'Email', index: 'Email', editable: true, edittype: 'custom', width: 220, editoptions: { custom_element: function(value, options) { return EmailAddressCustomElement(value, options); }, custom_value: function(elem) { var inputs = $("input", $(elem)[0]); return inputs[0].value; } } }, { name: 'LocationAndRole', index: 'LocationAndRole', editable: true, align: "left", edittype: "button", width: 170, editoptions: { value: 'Edit Location And Role', dataEvents: [{ type: 'click', fn: function(e) { ShowUsersLocationAndRoles(e); } }] } } ] </code></pre> <p>add the below code in the <code>gridComplete</code> event:</p> <pre><code>gridComplete: function() { var objRows = $("#list_accounts tr"); var objHeader = $("#list_accounts .jqgfirstrow td"); if (objRows.length &gt; 1) { var objFirstRowColumns = $(objRows[1]).children("td"); for (i = 0; i &lt; objFirstRowColumns.length; i++) { $(objFirstRowColumns[i]).css("width", $(objHeader[i]).css("width")); } } } </code></pre> <p>I hope the above code will help you in solving the issue.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload