jQWidgets Forums

jQuery UI Widgets Forums Grid Error opening cell editor

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Error opening cell editor #49661

    dpibt
    Participant

    Hi,

    I’ve found that in some cases, when you open a cell editor, it shows the last key pressed by default. One configuration that you can use to reproduce the error is something like that(taken from one of your jsfiddles):

      var data = generatedata(50);
     var source = {
         localdata: data,
         datafields: [{
             name: 'firstname',
             type: 'string'
         }, {
             name: 'lastname',
             type: 'string'
         }, {
             name: 'productname',
             type: 'string'
         }, {
             name: 'date',
             type: 'date'
         }, {
             name: 'quantity',
             type: 'number'
         }, {
             name: 'price',
             type: 'number'
         }],
         datatype: "array"
     };
    
     var adapter = new $.jqx.dataAdapter(source);
     $("#jqxgrid").jqxGrid({
         width: 500,
         theme: 'energyblue',
         source: adapter,
         editable: true,
         selectionmode: 'singlecell',
         groupable: false,
         columns: [{
             text: 'First Name',
             datafield: 'firstname',
             width: 90,
             pinned: false, 
             editable: false
          
         }, {
             text: 'Last Name',
             datafield: 'lastname',
             width: 90
         }, {
             text: 'Product',
             datafield: 'productname',
             width: 170
         }, {
             text: 'Order Date',
             datafield: 'date',
             width: 160,
             cellsformat: 'dd-MMMM-yyyy'
         }, {
             text: 'Quantity',
             datafield: 'quantity',
             width: 80,
             cellsalign: 'right'
         }, {
             text: 'Unit Price',
             datafield: 'price',
             cellsalign: 'right',
             cellsformat: 'c2'
         }]
     });
    

    In this case we have a non-editable cell (firstname). Select one of its cells and press a key. Then open another column cell editor by double clicking on it. The last key you pressed before should be written in the editor.

    It happens to me always I press a key and the editor of a cell is not opened at the moment.

    Hope it helps!

    Error opening cell editor #49667

    Peter Stoev
    Keymaster

    Thank you for the feedback. If you wish to update the default editor’s value, you can use the initeditor callback function of the column.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.