in Jqgrid how to show dropdown value which was updated in database by user by inline edit

后端 未结 1 647
無奈伤痛
無奈伤痛 2021-01-29 02:15

below is the code, in this the dropdown selected by the user is getting updated in database, but after refreshing the page i want to to display the value from database which was

相关标签:
1条回答
  • 2021-01-29 02:55

    Free jqGrid 4.14.0 allows to generate the editoptions.value or editoptions.value based on the all data of the grid. The setting in the column could looks like

    edittype: "select",
    editoptions: { generateValue: true },
    stype: "select",
    searchoptions: {
        sopt: ["eq", "ne"],
        generateValue: true,
        noFilterText: "Any"
    }
    

    If you use the filter toolbar, then the only thing, which one have to do additionally is recreating the filter toolbar by calling destroyFilterToolbar and filterToolbar methods. Editing have no such problems.

    The demo https://jsfiddle.net/OlegKi/yvbt6w54/1/, which I referenced in the README of the version 4.14.0, demonstrates the feature. Moreover, the demo shows how one can combine the feature with jQuery UI Autocomplete and select2.

    0 讨论(0)
提交回复
热议问题