jqgrid set the width of the edit dialog

jqgrid

Solution

There are separate settings for Add and Edit dialog. You use `edit: false, add: true` options of navGrid, but set the width of the Add dialog only. If you really need to have only Add dialog

$("#grid_id").navGrid('#gridpager', { edit: false, search: false },
    {/*Edit options*/}, { width: 700 }, { url: "/../Invoice/DeleteInvoiceLine" });

To have Edit dialog only you can use

$("#grid_id").navGrid('#gridpager', { add: false, search: false },
    { width: 700 }, {/*Add options*/}, { url: "/../Invoice/DeleteInvoiceLine" });

If you need have both Add and Edit dialog with different options you should use recreateForm: true options additionally:

$("#grid_id").navGrid('#gridpager', { search: false },
    { width: 700, recreateForm: true },
    { width: 600, recreateForm: true },
    { url: "/../Invoice/DeleteInvoiceLine" });

Problem

I'm using jqgrid and I have a edit dialog coming up: I don't want the default width of 300 but instead 700. I've search and found some examples and I changed my code to: ``` $("#list").navGrid('#pager', { edit: false, add: true, del: true, search: false }, {width:700}, {}, { url: "/../Invoice/DeleteInvoiceLine" }); ``` This should change the width to 700? It doesn't?

Original source