سؤال

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);
هل كانت مفيدة؟

المحلول

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

$("#containerGrid").jqGrid('addRow', parameters);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top