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 - stoodin

Pages: [1] 2 3 ... 6
1
Help for ParamQuery Pro / Re: HTML 5 Local Storage
« on: March 06, 2015, 07:53:39 pm »
Excellent, WORKS!!!
Thank you.

2
Help for ParamQuery Pro / HTML 5 Local Storage
« on: March 06, 2015, 12:42:35 am »
Do you have any demos or tips how to work with Local Storage?

I am trying to implement it and it doesn't work. I see the JSON array with properly set properties but the grid doesn't show the saved data.

Here what I do:
To Save in Local Storage:
          var dataLcHdr = $("#grid_lc_hdr_gV5").pqGrid("option", "dataModel.data");
          if (dataLcHdr) {
              window.localStorage.setItem('dataLcHdr', JSON.stringify(dataLcHdr));
          }

To get from Local Storage:
          if (window.localStorage.getItem('dataLcHdr')) {
              var dataLcHdr = JSON.parse(window.localStorage.getItem('dataLcHdr'));
              if (dataLcHdr) {
                  print_r(dataLcHdr);
                  $("#grid_lc_hdr_gV5").pqGrid("option", "dataModel.data",  dataLcHdr );
                  $("#grid_lc_hdr_gV5").pqGrid("refresh");
              }
          }

and the grid itself is very simple:
$(function () {         
 
    var lchdr_data_array = [
        {recordID:'1', hdr:"Work Order", pq_rowcls:'grp_row_hdr'},
        {recordID:'2', hdr:"Comments", pq_rowcls:'grp_row_hdr'}
   
    ];   
               
    var obj = {
        width: 1180,
        height: 400,
        wrap: true,
        showBottom: false,
        showHeader: false,
        showTop: false,
        rowBorders: true,
        numberCell: { show: false },
        collapsible: false,
        track: false,
        flexHeight: true,
        flexWidth: true,
        selectionModel: { type: 'cell' },
        scrollModel: { horizontal: false },
        hoverMode: 'cell',
        editModel: { keyUpDown: true, saveKey: $.ui.keyCode.ENTER },
        title: "<b>TIMESHEET<b>",
        colModel: [
               {title: "Row Header", minWidth: 218, dataIndx: "hdr", resizable: false, align: "right", editable:false, sortable:false},
               {title: "Wo1", minWidth: 130, dataIndx: "wo1", resizable: false, align: "center", dataType:"string", cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data)}}},
               {title: "Wo2", minWidth: 130, dataIndx: "wo2", resizable: false, align: "center", dataType:"string",cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}},
               {title: "Wo3", minWidth: 130, dataIndx: "wo3", resizable: false, align: "center", dataType:"string",cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}},
               {title: "Wo4", minWidth: 130, dataIndx: "wo4", resizable: false, align: "center", dataType:"string",cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}},
               {title: "Wo5", minWidth: 130, dataIndx: "wo5", resizable: false, align: "center", dataType:"string",cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}},
               {title: "Wo6", minWidth: 130, dataIndx: "wo6", resizable: false, align: "center", dataType:"string",cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}},
               {title: "Wo7", minWidth: 130, dataIndx: "wo7", resizable: false, align: "center", dataType:"string",cls: "whiteBck Start-DayBorder",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}},
               {title: "btn", minWidth: 85, dataIndx: "btn", resizable: false, align: "center", dataType:"string",editable:false, cls: "whiteBck",
                    editor: { type:function (ui) {grpHdrEditor(ui,grp_wo_data , '100px')}}}
        ],
        dataModel: {
            location: "local",
            recIndx: "recordID",
            rPP: 50,
            data: lchdr_data_array
        },
        quitEditMode:function (evt,ui) {
            if (evt.keyCode != $.ui.keyCode.ESCAPE) {
                $grid.pqGrid("saveEditCell");
            }
        }       
    }

    var $grid = $("#grid_lc_hdr_gV5").pqGrid(obj);
                   
});

3
 $("div.pq-cont").on("scroll") event doesn't seems to be triggered.

I added something similar on the add row:
$grid.pqGrid('scrollRow', {rowIndxPage: 0});

It seems to be helping even with my css settings. The only problem now if I add a row with arrow down then it works partially.
That said I've updated your fiddle with my code but still can't reproduce it there ....

It seems to me that the top row dissapears when I click on the editor ... but sometime it works

Any ideas would be appreciated.

4
I think I found a problem.
I have a custom css settings for this grid that impacted the normal behaviour. It works as soon as I removed them!!!

#grid_wkly_lc_schdl td *
{
   font-size: 12px;
   min-height:20px;
   line-height:20px;   
}
#grid_wkly_lc_schdl .pq-grid-cell
{
   font-size: 11px;
   min-height:20px;
   line-height:20px;   
}

5
I have a case on Windows 7, IE10 when grid is working fine with default Windows font settings, however when I change the Windows Font Size to Medium then go to grid and add a second row then the first row become invisible unless you click arrow up
Please see the attachment for screenshots.

My grid fonts are defined as
div.pq-grid *{
   font-family:Arial ,sans-serif;
   font-size:12px;
   color:black;
   }

6
Help for ParamQuery Pro / One click to open custom select editor
« on: December 16, 2014, 07:35:32 pm »
Is there any way to make custom select editor to be open just on one click? The way it works now (even in your demo) the first click just shows the drop down the second click opens it.
I am using
editModel: {
           saveKey:$.ui.keyCode.ENTER,
           cellBorderWidth: 1,
           clicksToEdit: 1,
           onBlur: 'save',
            keyUpDown:true},

and the editor:
var usersDropDownEditor2 = function (ui, getUsrUrl, searchParam, wdth, callType) {
   var $inp = ui.$cell.find("select");
       rowData = ui.rowData,
       dataIndx = ui.dataIndx,
       dataCell = rowData[dataIndx];

    if (isStringEmpty(wdth))
       wdth = '300px';

   // alert(wdth);
    $inp.width(wdth);
   
    $.ajax({
       url: getUsrUrl,
       type: callType,
       data: searchParam,
        dataType: "json",
        cache: false,
       success: function(json_arr) {
          var opt = $('<option />'),
             fullDesc, empId;
          
          $inp.append(opt);
          
          $.each(json_arr, function(i,val) {
             opt = $('<option />');
             empId = val.employeeId,
             fullDesc = val.rlfName;
             opt.attr('value', empId).text(fullDesc);
             
               if (dataCell && dataCell == fullDesc) {
                  opt.attr('selected', 'selected');
               }
              
               $inp.append(opt);
           });

       },
        error: function(xhr, error) {
           alert("System Error: " +  xhr.responseText);
        }
    });
};

7
Help for ParamQuery Pro / Row height changes with wrap=true
« on: December 02, 2014, 02:57:47 am »
I have a case where I enter a value in cell that is very long. The grid properly adjusted the height and all value is visible (see attachment).
However when I click on any other cell withing the same grid the row height gets back to the original height which is smaller than wrapped one and the wrapped value is cut off.
Please see attachment.
Thank you for your help.

I am using IE7 and grid with:
$(function () {   
    var obj = {
        width: 975,
        height: 400,
        wrap: true,
        showBottom: false,
        showHeader: true,
        showTop: false,
        rowBorders: true,
        numberCell: { show: false },
        collapsible: false,
        trackModel : { on: true },
        flexHeight: true,
        flexWidth: true,
        virtualX: true,
        scrollModel: { horizontal: false },
        hoverMode: 'cell',
        editModel: {
           saveKey:$.ui.keyCode.ENTER,
           cellBorderWidth: 1,
           clicksToEdit: 1,
           onBlur: 'save',
            keyUpDown:true},

8
I am calling  var changes = $grid.pqGrid("getChanges", { format: "byVal" }),
        updateList = changes.updateList;
   if (updateList && updateList.length > 0) {
      hdnDataField.val(JSON.stringify(updateList));
   }

On my grid I have
trackModel : { on: true },
        editModel: {
           saveKey:$.ui.keyCode.ENTER,
           cellBorderWidth: 1,
           clicksToEdit: 1,
           onBlur: 'save',
            keyUpDown:true},

.....
        editorEnd: function (evt, ui) {
            if (evt.keyCode != $.ui.keyCode.ESCAPE) {
                $grid.pqGrid("saveEditCell");
            }
        }


Now getChanges returns me the entire row, even though I changed just one cell. Is there anyway to get just the cell that changed?

Thank you

9
the autoFit and flexWidth don't help since the grid is still wider than the page with lower resolution.
The slow performance noticed in IE7 only when I add a horizontal scroll bar. I don't have any heavy logic there and it works decent in other browsers.
It looks to me that the page or grid gets refreshed when I click with mouse on the cell and this is causing the delay and shift the page to the left.
Any idea what it can be in this dummy IE7?

10
Unfortunately I can't provide you a small test and I expected that you won't be able to reproduce, however what I found so far that if I add a horizontal bar on the grid and scroll to the right using it, mouse click works, but very very slow. It takes 3-4 sec to navigate from one cell to another.
Also I have a requirements to use only browser scroll, not the grid one.

The new screen shot attached.

11
Any chance you can take a look at this?
Here is the scenario:
IE7, gird is not autofit and doesn't have horizontal bar. The size of the grid is wider than the browser window. User has to scroll right to access the cell. When user scrolls right and try to select a cell with mouse to make some changes basically the Editor doesn't open and page moves to the middle. Tab is working fine.
Screen shot attached.
You may not be able to reproduce it, but if you give me some hint where to look I will investigate myself.

12
Help for ParamQuery Pro / Re: colModel cls doesn't change the header
« on: October 16, 2014, 11:26:19 pm »
FANTASTIC!!! That is exactly what I need

13
Help for ParamQuery Pro / Re: colModel cls doesn't change the header
« on: October 16, 2014, 08:14:51 pm »
Sorry, let me clarify my question:

I have a grid with 10 columns and each column has a title.
I need to change the HEADER CELL "border-right=solid 1px black;" on 3rd, 5th, 7th and 9th columns. The rest of the headers will have a regular border.
Let me know if it is clear now.

14
Help for ParamQuery Pro / colModel cls doesn't change the header
« on: October 16, 2014, 06:26:47 pm »
I need to change a header for some of the columns. For example every 3rd column header should have a border.
I am using cls property and it works for entire column but header.
.pq-grid td.pq-grid-col css is changing the style for all columns including header, but I need just a few not all
How do I change header border for specific headers?

15
Update:
Fixed in IE8 and higher by <!DOCTYPE HTML> but IE7 is still shifts page over the left when I click the last cell on the right

Pages: [1] 2 3 ... 6