jQWidgets Forums

jQuery UI Widgets Forums Grid grid and createEverPresentRowWidget

This topic contains 7 replies, has 3 voices, and was last updated by  rdouglas 6 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • grid and createEverPresentRowWidget #92040

    arkgroup
    Participant

    I am using modify version of your sample code at
    http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm#demos/jqxgrid/everpresentrowcustomwidgets.htm
    Product drop down list worked fine, until I press button and refresh data. Then it’s not working. Please see code below.

    Thanks

     $(document).ready(function () {
            var data = generatedata(20);
           // console.log(data);
    
            var source =
            {
                localdata: data,
                datafields:
                [
                    { name: 'name', type: 'string' },
                    { name: 'productname', type: 'string' },
                    { name: 'available', type: 'bool' },
                    { name: 'date', type: 'date' },
                    { name: 'quantity', type: 'number' }
                ],
                datatype: "array"
            };
            var dataAdapter = new $.jqx.dataAdapter(source);
            var getSourceAdapter = function (name) {
                var source =
                {
                    localdata: data,
                    datafields:
                    [
                        { name: 'name', type: 'string' },
                        { name: 'productname', type: 'string' }
                    ],
                    datatype: "array"
                };
                var fields = new Array();
                fields.push(name);
                var dataAdapter = new $.jqx.dataAdapter(source, { autoBind: true, autoSort: true, uniqueDataFields: fields, autoSortField: name });
                return dataAdapter.records;
            }
            $("#jqxgrid").jqxGrid(
            {
                width: 850,
                filterable: true,
                source: dataAdapter,
                showeverpresentrow: true,
                everpresentrowposition: "top",
                editable: true,
                everpresentrowactionsmode: "columns",
                columns: [
                  {
                      text: 'Name', columntype: 'textbox', filtertype: 'input', datafield: 'name', width: 215
                   
                  },
                  {
                      text: 'Product', filtertype: 'checkedlist', datafield: 'productname', width: 220,
                      createEverPresentRowWidget: function (datafield, htmlElement, popup, addCallback) {
                          var inputTag = $("<div style='border: none;'></div>").appendTo(htmlElement);
                          inputTag.jqxDropDownList({ popupZIndex: 99999999, placeHolder: "Enter Product: ", source: getSourceAdapter("productname"), displayMember: 'productname', width: '100%', height: 30 });
                          $(document).on('keydown.productname', function (event) {
                              if (event.keyCode == 13) {
                                  if (event.target === inputTag[0]) {
                                      addCallback();
                                  }
                                  else if ($(event.target).ischildof(inputTag)) {
                                      addCallback();
                                  }
                              }
                          });
                          return inputTag;
                      },
                      getEverPresentRowWidgetValue: function (datafield, htmlElement, validate) {
                          var selectedItem = htmlElement.jqxDropDownList('getSelectedItem');
                          if (!selectedItem)
                              return "";
                          var value = selectedItem.label;
                          return value;
                      },
                      resetEverPresentRowWidgetValue: function (datafield, htmlElement) {
                          htmlElement.jqxDropDownList('clearSelection');
                      }
                  },
                  {
                      text: 'Ship Date', datafield: 'date', filtertype: 'range', width: 210, cellsalign: 'right', cellsformat: 'd'
                  },
                  {
                      text: 'Qty.', datafield: 'quantity', filtertype: 'number', cellsalign: 'right'
                  }
                ]
            });
    
            $("#jqxButton").jqxButton({ width: 120, height: 40 });
    
            $("#jqxButton").on('click', function () {
                var data = generatedata(5);
                source.localdata = data;
                dataAdapter.dataBind();
                $('#jqxgrid').jqxGrid('refreshdata');
            });
    
        });
    grid and createEverPresentRowWidget #92076

    Hristo
    Participant

    Hello arkgroup,

    Thank you for this feedback.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    grid and createEverPresentRowWidget #92078

    arkgroup
    Participant

    Hi Hristo,

    Is there work around to fix that?

    Thanks

    grid and createEverPresentRowWidget #92085

    Hristo
    Participant

    Hello arkgroup,

    You could find new things (and fixes) in the Release History.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    grid and createEverPresentRowWidget #92103

    arkgroup
    Participant

    Hi Hristo,

    I downloaded the latest 4.5.0 version, but it’s still not working.
    Can you help, please. Maybe I can use reseteverpresentrowwidgetvalue or
    destroyeverpresentrowwidget, but don’t know how and there is no sample code for that.

    Thanks

    grid and createEverPresentRowWidget #92124

    Hristo
    Participant

    Hello arkgroup,

    Thank you for the interest.
    When it is possible we provide a workaround but not bugs fixing.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    grid and createEverPresentRowWidget #92155

    arkgroup
    Participant

    Can you confirm that this is a jqxgrid bug and will be fixed in next release?

    Thanks

    grid and createEverPresentRowWidget #104410

    rdouglas
    Participant

    This forum isn’t very helpful

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

You must be logged in to reply to this topic.