Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - gblawler

Pages: [1]
1
Another thing I noticed with Pro 3.3.1 grid, using a between filter on a date column is that if I set value equal to something, it works fine for the initialization like i want, but then if I click the refresh button, and I've changed anything about those two value/value2 filters, they get reset to the original values.

That's bad UI for my users, I think, I'd rather only have it do that on initial page load and then subsequent refreshes should leave them alone.  What's a good way to handle that?

2
I should mention I'm doing this on Pro 3.3.1, but figured I'd post to this forum since I'm out of regular support for my license, I think.

Please relocate me if I should be.

3
Hi, I'd like to do my date filtering (in head row) with the between value/value2 elements, but instead of having them horizontal, on the same line, as they do by default, like in this example:

https://paramquery.com/pro/demos33

I'd like to have them be on top of each other to keep the column width down to reasonable size.  Can't figure out a straightforward way to do this.

Is there a good simple way?  if not that, how about a somewhat more complicated one?

Thanks

4
Bug Report / Re: Scroll bar issue with nested grids
« on: February 08, 2018, 01:11:04 am »
Hi, I purchased a Pro license back in late 2015, and am currently using version 3.3.1, which I think also has this issue (I'm just now for the first time using nested grids).

Am I eligible for the 3.4.1 update that you mention to fix this issue?  If so, how do I go about downloading it?

Thanks.

5
Quote
Try to replace trackModel: { on: true } with trackModel: { on: true, dirtyClass: 'pq-cell-dirty' } in pqGrid initialization options.

That did it, simply putting the dirtyClass specific on there.

Also, I do not think that I am changing trackModel anywhere else in the code, it's only initialized up front.

Thanks for your support!

6
Call stack from Firebug is:

Quote
fn.addClass(_objP=Object { type="object"})pqgrid.dev.js (line 6581)
_pUCData.update(objP=Object { type="object"})pqgrid.dev.js (line 12145)
fn._digestData(ui=Object { type="object"})pqgrid.dev.js (line 5395)
fnGrid.updateRow(ui=Object { type="object"})pqgrid.dev.js (line 12712)
fn.saveEditCell(objP=Object { type="object"})pqgrid.dev.js (line 5214)
_pKeyNav._saveAndMove(objP=Object { type="object"}, evt=Object { type="object"})pqgrid.dev.js (line 7046)
_pKeyNav._keyDownInEdit(evt=Object { type="object"})pqgrid.dev.js (line 7184)
fn._editCell/<(evt=Object { type="object"})pqgrid.dev.js (line 5865)
jQuery.event.dispatch(event=Object { type="object"})jquery.js (line 5094)
jQuery.event.add/elemData.handle(e=Object { type="object"})jquery.js (line 4766)

I hope just my PQ option structure is sufficient for the code:

Code: [Select]
var gridLFE_opt = {
  collapsible: false,
  width: 300,
  dataModel: {
    location: "remote",
    dataType: "JSON",
    method: "GET",
    getUrl: function() {
      return {
        url: 'ajax_table_read.php',
        data: {
          TableName: 'LinkedFileEntity',
          LinkedFileId: $('#Id').val()
        }
      };
    },
    recIndx: 'Id',
    getData: function (dataJSON) {
      var data = dataJSON.data;
      return { totalRecords: dataJSON.totalRecords,
               data: data };
    }
  },
  colModel: [
    { dataType: 'integer', dataIndx: 'Id', hidden: true, editable: false },
    { title: "Entity", dataIndx: "EntityName", width: 90,
       editor: {
        type: 'select',
        valueIndx: "value",
        labelIndx: "value",
        options: [
          { "value": "" },
          { "value": "c" },
          { "value": "d" }
        ]
      },
      validations: [{ type: 'minLen', value: 1, msg: "Required"}]
    },
    { title: 'Id', dataIndx: "EntityId", width: 70,
      validations: [{ type: 'regexp', value: /^[1-9][0-9]*$/, msg: "integer only"}]
    },
    { title: "Purpose", dataIndx: "PurposeCode", width: 100,
       editor: {
        type: 'select',
        valueIndx: "value",
        labelIndx: "value",
        options: [
          { "value": "" },
          { "value": "a" },
          { "value": "b" }
        ]
      },
      validations: [{ type: 'minLen', value: 1, msg: "Required"}]
    },
    { title: "", editable: false, minWidth: 55, sortable: false,
        render: function (ui) {
            return "<button type='button' class='delete_btn'></button>";
        },
        postRender: function (ui) {
            var grid = this,
            $cell = grid.getCell(ui);
            $cell.find(".delete_btn")
                .button({ icons: { primary: 'ui-icon-scissors'} })
                .bind("click", function (evt) {
                  if (ui.rowData.Id === undefined ||
                      confirm('are you sure?'))
                     grid.deleteRow({ rowIndx: ui.rowIndx });;
                });
        }
    }
  ],
  editable: true,           
  title: 'Links',
  hwrap: false,
  numberCell: { show: false },
  toolbar: {
    items: [
      { type: 'button', cls: 'two_em', icon: 'ui-icon-plus', listener:
        { "click": function (evt, ui) {
            var rowIndx = grid.addRow({ rowData: {
              PurposeCode: $('#PurposeCode').val()
            }});
            grid.goToPage({ rowIndx: rowIndx });
            grid.editFirstCellInRow({ rowIndx: rowIndx });
          }
        }
      },
      { type: 'button', cls: 'two_em', icon: 'ui-icon-arrowrefresh-1-e',
        listener:
          { "click": function (evt, ui) { grid.refreshDataAndView(); }
          }
      },
      {
        type: "<span class='saving'>Saving...</span>"
      }
    ]
  },
  postRenderInterval: -1,
  trackModel: { on: true },
  change: function (evt, ui) {

    var grid = this;

    if (grid.isDirty() && grid.isValidChange({allowInvalid: true}).valid) {

      var changes = grid.getChanges({ format: 'byVal', all: false });
      if (changes.addList) {

        for (var i = 0; i < changes.addList.length; i++) {
          changes.addList[i].LinkedFileId = $('#Id').val();
          if (changes.addList[i].PurposeCode === undefined)
            changes.addList[i].PurposeCode = $('#PurposeCode').val();
        }
          $.ajax({
              url: "ajax_table_dml.php",
              data: {
                TableName: 'LinkedFileEntity',
                list: JSON.stringify({
                  addList: changes.addList,
                  updateList: changes.updateList,
                  deleteList: changes.deleteList
                })
              },
              dataType: 'json',
              async: true,
              beforeSend: function(jqXHR, settings) {
                $('.saving', grid.widget()).show();
              },
              success: function(changes) {
                grid.commit({ type: 'add', rows: changes.addList});
                grid.commit({ type: 'update', rows: changes.updateList});
                grid.commit({ type: 'delete', rows: changes.deleteList});
              },
              complete: function() {
                $('.saving', grid.widget()).hide();
              }
          });

      }
     
    }

  }
};

Thanks for reviewing my issue.

7
Help for ParamQuery Grid (free version) / colModel width property ignored
« on: January 22, 2016, 05:10:15 am »
Hi, I'm using Pro v 3.2.0 and am having problems where the width property on some of my columns (using the auto-save model of editing) are seemingly ignored.

E.g., a value of '236124' is being wrapped so that the trailing '4' is on a second line by itself, and a single word with no spaces is being cut in half in another column.  Also, double clicking the separator bar between the columns (which usually will auto-size them properly, as in Excel) does not seem to work ... I suppose both are symptoms of the same issue.

So, what might be causing the grid to not properly set the widths as I want in this case?  Any hints as to what option I may have incorrect set or should set to correct this?

The above symptoms happen when I have 'flex: { one: true }' on in my options, but if I take that out, the columns still don't size as I want (though they seem to respect the 'width' options then), and *then* if I double click the separator part, they *do* go to exact the right size.

Any suggestions, anyone?

8
Hi, I just recently started using ParamQuery (Pro) v 3.2.0, and have a mostly full implementation done of a simple grid I'm using with support for insert/update/deletes.

I've got the inserts & deletes working fine now, but whenever I go to do an update (I'm using the auto-saving mode, with demo here:

http://paramquery.com/pro/demos/editing_instant

).

In the console on Firefox I get:

Quote
TypeError: newcls is undefined

pointing to this line in pqgrid.dev.js: 6581:

TypeError: newcls is undefined

Code: [Select]
newcls = uniqueArray(newcls.split(/\s+/)).join(" ");
Could anyone help me out on what I'm doing wrong here, if anything?  I imagine I may just be missing some option or have an incompatible one set or something, but I'm surprised since the updates and deletes work.

Pages: [1]