Autocomplete jQuery Grid

I am creating a webapp using jQuery and jQuery UI. I'm at a dead end. I need a jQuery grid that has editable fields and somehow includes an autocomplete field in one of these editable cells, and I cannot find any grid suggestions that implement this.

I watched StickGrid and jgGrid

I especially like jqGrid since it is Themeroller ready. Does anyone know if anyone was able to successfully integrate autocomplete on one of these grids or any other jquery grid?

+3
source share
2 answers

, , , . -/ .

"", .

"" , (css ), ( , ).

, jqGrid - + jQuery Autocomplete

http://jsbin.com/owatu ( /edit URL-, )

,

  • css
  • afterSaveCell, , jQgrid, , + ,

, AfterSaveCell jqGrid .

jQuery("#celltbl").jqGrid({
    ...
    {name:'name', width:100, editable:true}, //e.g.
    ...
    afterEditCell: function (id,name,val,iRow,iCol) {
        if(name=='name') {
            //cities here is local json object
            jQuery("#"+iRow+"_name","#celltbl").autocomplete(cities);
        }
    },
    afterSaveCell : function(rowid,name,val,iRow,iCol) {
        if(name == 'name') {
            jQuery("#celltbl").jqGrid('setRowData',rowid,{name:jQuery(".ac_over").text()});
            jQuery(".ac_results").remove();
        }
    }
    ...
+4

, jqGrid javascript-.

: , afterEditCell, u , rowid, cellname, value, iRow, iCol , iRow , , . -

beforeEditCell , rowid, cellname, value, iRow, iCol .

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:cell_editing

!

0

Source: https://habr.com/ru/post/1726017/


All Articles