Frage

I'm using the following code to fill one of the cells of a new row with a default value, but this is not working (the cell is empty). Is this code ok?

var parameters =
                {
                    rowID: "new_row",
                    initdata: {
                        IdField: $('#IdField').val(),
                        Description: $('#IdField option:selected').text()
                    },
                    position: "first",
                    useDefValues: false,
                    useFormatter: false,
                    addRowParams: { extraparam: {} }
                };

            $("#containerGrid").jqGrid('addRow', rowid, parameters);
War es hilfreich?

Lösung

Problem solved by removing the rowid parameter from the addRow method.

$("#containerGrid").jqGrid('addRow', parameters);
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top