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
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.