mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.81k stars 1.98k forks source link

implements cell with chossen.js #1128

Open ramonYcajal opened 7 years ago

ramonYcajal commented 7 years ago

hello!!!, I`trying with chosen js plugin to display a combo into cell of my grid, but i have no results. I try with a new function in editors.js with som class of chossen, like this unction SelectCellChosen(args) { var $select; var defaultValue; var scope = this; this.init = function() {

        if(args.column.options){
          opt_values = args.column.options.split(',');
        }else{
          opt_values ="yes,no".split(',');
        }
        option_str = ""
        for( i in opt_values ){
          v = opt_values[i];
          option_str += "<OPTION value='"+v+"'>"+v+"</OPTION>";
        }
        $select = $("<SELECT tabIndex='0' class='chosen-select'>"+ option_str +"</SELECT>");
        $select.appendTo(args.container);
        $select.focus();
    };

Can I implement a cell with chosen plugin and not by selectCell???

thanks!!!

6pac commented 7 years ago

Check out my more modern repo: https://github.com/6pac/SlickGrid

I ended up going with the Select2 plugin as the HTML Select uses is not really compatible with SlickGrid. The dropdown cannot be displayed outside the boundaries of the grid.

http://6pac.github.io/SlickGrid/examples/example-select2-editor.html

ramonYcajal commented 7 years ago

ok, thanks.