How to get select's value in jqGrid when using <select> editoptions on a column

前端 未结 4 1306
别跟我提以往
别跟我提以往 2021-01-02 11:20

I have a couple of columns in jqGrid with edittype=\"select\". How can I read the option value of the value currently selected in a particular row?

e.g.: When I prov

4条回答
  •  梦毁少年i
    2021-01-02 11:25

    If in case you have requirement where each row has dropdown and it has values like

    FE:'FedEx', IN:'InTime', TN:'TNT'

    Now instead of saving the data to backend on dropdown change event;you want to save data on "Save" button click at row level but want to save dropdwon selected value (TN) not display text(TNT). You can create another hidden field to set selected country code on inline editing of dropdown. Here when user exit after cell inline editing afterSaveCell method will be called and you can set it as mentioned in below code:

        
    
    
        http://stackoverflow.com/q/9655426/315935
        
        
    
        
        
        
        
        
        
        
        
        
    
    
        

提交回复
热议问题