jQWidgets Forums

jQuery UI Widgets Forums Grid Any Solutions 4 a dropdown in GRID!!!

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 12 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Any Solutions 4 a dropdown in GRID!!! #5498

    jose Ivan
    Member

    HI ,i was reading all the post about the theme , i can see that dropdownList is not very useful in grid.

    I’m workin’ with a editable grid. I have a field that is a foreign key so i rewritte on binding complete or maybe with a cellrender another way.i get this list by ajax and i set  a variable.so i would like to display the information . i do this with alt+down key and works prefect but with click doesn’t work . I got a validation so when i click in the cell it goes to the event.

    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 });

    { text: 'Proyecto', columntype: 'dropdownlist', datafield: 'jobid', width: 10,
                          validation: function (cell, value) {
                              var validation = migrid.GetFieldInList(migrid.jobsList, 'displaylabel', value.toString(), true);
                              if (validation.length == 0) {
                                  return { result: false, message: "Seleccione un registro..." };
                              }
                              return true;
                          },
                          initeditor: function (row, cellvalue, editor) {
                              editor.jqxDropDownList({ displayMember: 'displaylabel', valueMember: 'catalogvalue', source: dropdownListAdapter });
                          }
    }
    Any device ? note: this happens 4 example when the column has not datavalue . so it '' empty.
    if u have a  any way to do this...
    Any Solutions 4 a dropdown in GRID!!! #5513

    Peter Stoev
    Keymaster

    Hi jose Ivan,

    The purpose of the DropDownList is to enable the user to edit values from the same column. The unique values of the column cells are displayed in a popup list for convenience to the user. That’s the editor’s function by design. It is also better to bind the DropDownList in a function called createeditor instead of initeditor. Otherwise, you will set up the widget’s source every time the user opens a cell for editing.

    Best Regards,
    Peter Stoev

    jQWidgets
    http://www.jqwidgets.com

    Any Solutions 4 a dropdown in GRID!!! #5519

    jose Ivan
    Member

    Thanks 4 reply… but the createeditor doesn’t work!! in a grid, i’m using the version 2.0 . if i use the initeditor the list appears just only with the keyboard ! no the click.


    Peter Stoev
    Keymaster

    The current version of jqxGrid is 2.2.1. If you plan to upgrade to it, you can use the createeditor function.

    Best Regards,
    Peter Stoev

    jQWidgets
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.