jQuery UI Widgets Forums Grid DropdownList in Grid… Any Idea why?

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  jose Ivan 11 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • jose Ivan

    Hi,i get the last version of jqwidgets 2.2.1.I have a dropdownlist column and i want to bind a datasource and works good only with the keyboard… when i click in this doesn’t show the list …. and don’t know what else to do!!!..

    I got this…

    $(document).ready(function () {
            type: 'POST',
            dataType: 'json',
            async: false,
            url: '/core/AccountingService.asmx/GetJobs',
            data: '{ companyID :' + migrid.companyID + '}',
            cache: false,
            contentType: 'application/json; charset=utf-8',
            success: function (catalogos) {
                var res = JSON.stringify(eval(catalogos.d.Table));
                migrid.jobsList = $.parseJSON(res);
            error: function (err) {
                alert('EnGetJobs' + err.toString());
     var dropDownListSource =
                    localdata: migrid.jobsList,
                    datatype: "json",
                    datafields: [
                        { name: 'catalogitemid' },
                        { name: 'name' },
                        { name: 'displaylabel' },
                        { name: 'catalogvalue' }
                    id: 'catalogvalue'
                    //url: url
      var dropdownListAdapter = new $.jqx.dataAdapter(dropDownListSource, { autoBind: true, async: false });
                    width: '100%',
                    source: dataAdapter,
                    editable: true, altrows: true, enablehover: true, enabletooltips: true,
                    enableanimations: true, keyboardnavigation: true, autoheight: true, pageable: false, columnsresize: true,
                    columnsresize: true, theme: migrid.theme,
                    editmode: 'selectedcell',
                    selectionmode: 'singlecell',
                    columnsFilter: migrid.columnsFilters,/*these values are mine*/
                    numberColumns: migrid.columsDeciamal,/*these values are mine*/
                    noteditable: migrid.ColumnNoEditables,/*these values are mine*/
                    _class: migrid.name,
                    columns: [
                      { text: 'Fila', columntype: 'checkbox', width: 10, datafield: 'ready', cellbeginedit: isCellEditable },
    	          {text: 'Proyecto', columntype: 'dropdownlist', datafield: 'jobid', width: 10, cellbeginedit: isCellEditable,
    		       createeditor: function (row, cellvalue, editor) {
    			   editor.jqxDropDownList({ displayMember: 'displaylabel', valueMember: 'catalogvalue', source: dropdownListAdapter });
                }); //fin del Grid

    Peter Stoev

    Which version of jQuery do you use? Do you use the version of jQuery which comes with Visual Studio or a jQuery 1.6+ version?

    Best Regards,
    Peter Stoev

    jQWidgets Team

    jose Ivan

    jquery v1.7.2 . I found the problem…
    $(migrid.grid).jqxGrid({ selectionmode: ‘singlecell’ });

    this happen when i change the selectionmode, i got the feature the select multiples rows, this for delete the rows selected, but in the event cellclick i change the selectionmode to single $(migrid.grid).jqxGrid({ selectionmode: ‘singlecell’ }); and then no display with the mouse.

    i got the code… the function getFistCheckboxColumn get the first datafield that ‘s a check column so when i change the value i set the selectionmode=’multiplerows’ and when i select a any cell i change the selectionmode to singlecell…

    { text: ‘Fila’, columntype: ‘checkbox’, width: 10, datafield: ‘ready’, cellbeginedit: isCellEditable },

    $(migrid.grid).bind(“cellclick”, function (event) {
    $(migrid.grid).jqxGrid({ selectionmode: ‘singlecell’ });
    migrid.selectionmode = ‘singlecell’;

    $(migrid.grid).bind(‘cellendedit’, function (event) {
    if (event.args.datafield == migrid.getFistCheckboxColumn()) {
    $(migrid.grid).jqxGrid({ selectionmode: ‘multiplerows’ });
    if (event.args.value) {
    $(migrid.grid).jqxGrid(‘selectrow’, event.args.rowindex);
    else {
    $(migrid.grid).jqxGrid(‘unselectrow’, event.args.rowindex);

    so if i remove the line $(migrid.grid).jqxGrid({ selectionmode: ‘singlecell’ }); everything works fine!!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.