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

Pages: [1] 2 3 ... 6
1
Please see the attachment

2
Hi support team
I found an issue on paramquery.
When I press enter key, the focus should be moved to next cell. However, some time the browser
catch the exception on the script, it is called on "this.replace" function cannot find.

could you give us some support?

many thanks


3
Help for ParamQuery Pro / Issue on Header Alignment with the Content
« on: September 23, 2015, 02:19:41 pm »
Hi Support team
I found the issue on the Header Alignment with the Content of the paramquery.
example:
we made the the first two columns fixed, and other columns can be scrolling horizontally.
but the  Header and Contents always has little alignment shifting, you must manual scrolling it, then it
will be ok.
do you have solutions on this issue?

many thanks

4
"editable" works for checkbox editors too. Check this demo (column "Discontinued") http://paramquery.com/pro/demos/editing

Sorry, I didn't described clearly. I use the "checkBoxSelection", but I want to control then edit permission for each row.

Code: [Select]
{ title: "Ready for review", dataIndx: "state", maxWidth: 50, minWidth: 50, align: "center", cls:'checkReadForReview',
cb: { header: true, all: false },
type: 'checkBoxSelection',  resizable: false, sortable: false,
editable: false,
}

At before, I used "render" option to generate "checkbox" by html string. And I can check some value and control the edit permission.

Code: [Select]
render: function (ui){
    var rowData = ui.rowData, dataIndx = ui.dataIndx;
    var val = rowData[dataIndx];
    if(val == 'total'){
        return '';
    }
    else{
        var currentId = rowData['Id']+'PMM';
        var currentStatus = rowData['status'];
        str = "";
        if (val) {
            str = "checked='checked'";
        }
        var validatedValue = rowData['validatedandLocked'];
        if(isPriceAnalyst == 'true'){
            if(String(validatedValue) == 'true' && {!(isUnlocked)}){
                reStr = "<input id='"+currentId+"' type='checkbox' " + str + " onclick='pmmDoneCheck(\""+currentId+"\")' />";
            }
            else{
                reStr = "<input id='"+currentId+"' type='checkbox' " + str + "  disabled='true' />";
            }
            return reStr;
        }
        else{
            return "<input id='"+currentId+"' type='checkbox' " + str + "  disabled='true' />";
        }
                                   
    }
}

Thank you!

5
Any change to the grid DOM should be done in refresh event.

Code: [Select]
refresh: function(){
$(this).find(".pq-grid-title-row input[type='checkbox']").wrap("<span>Title</span>");
},

Works. Thanks for your feedback!
BTW, the "editable" only control the cell content. So how to control the check-box editable permission?


Thank you!

6
Hi team,

I used "checkBoxSelection" in one of my table column.
My codes for this column:
Code: [Select]
{ title: "", dataIndx: "state", maxWidth: 30, minWidth: 30, align: "center", cls:'checkReadForReview',
   cb: { header: true, all: false },
   type: 'checkBoxSelection',  resizable: false, sortable: false, editable: false
}

As the API said, when I set "header" as "true", the checkbox will display on the header without any title. And if I set it as "false", I can set title for the column.
But I want to let user choose the whole column so I set "true" for "header". And I try to use jquery to add a title dynamically.

Have a look with my codes:
Code: [Select]
$("td[pq-col-indx=126][pq-row-indx=0]").append('<div class="pq-td-div">Ready For Review<span class="pq-col-sort-icon">&nbsp;</span></div>');

When these codes run, the title can add on the header, but the first column in my table have a problem. It looks like the title contents change the whole style for the table.(As the screenshot pic "FirstColumn").
The column will become normally after I click it("Normally" pic). And the title which I just add by js will disappear.


So do you have any suggestion to add a title when I want to keep "header:true" ?


Thank you!

7
It seems some of your columns are uneditable but you want to persist all field values passed in addRow.

You could pass checkEditable: false to addRow method.

http://paramquery.com/pro/api#method-addRow

Thanks for your support! :)

8
I've submitted it for further examination.

Meanwhile you can use getRowData() method to get rowData from rowIndx.

http://paramquery.com/pro/api#method-getRowData

Thanks for your support.
As I test it caused by my add new row in pgtable.
And it is very strange, when I create a new row, I will set some initial value for each column, some of them have default value, some of them are "".
Then when this finished, after the "addRow" function, this row insert my pqtable. Then some column have "render" function. I debug one of them. When I check the ui.rowData for one render function, I can't get all column which I initialed in my addRow function. Only some of them.

Thank you!

I'm not sure whether my description is clearly...

9
Noctrona

ui.rowData is present in column.editable for 2.4.1

It's used in this demo http://paramquery.com/pro/demos/readonly_cells and it's the same code for 2.4.1

Are you facing this issue for all columns.

Yes.
The problem only happened when I create a new row in table. If I double click a cell for an existing records, the "editable" can works well.
But if I create a new empty row. The problem happened. Is that caused by the empty row contents?
Please have a look with my codes about add a new empty row in table:
Code: [Select]
$("#addColumn").click(function(){
var DM = $( "#grid_json" ).pqGrid( "option", "dataModel" );
if(typeof(DM.data) != "undefined"){
var rows = DM.data.length;
var rowData = { Id:'',productId:'',product:'',
basicMaterial:'', MissingDataMessage : '',status:'',
volume:0,startDate: sDate,endDate:eDate,accessoryId:'',
volumeEdit:false,cosEdit:false
};
$( "#grid_json" ).pqGrid("addRow", { rowIndxPage: rows+1, rowData: rowData });
if(isPriceAnalyst != 'true'){
$("#grid_json").pqGrid("addClass", { rowIndx: rows, dataIndx: 'costOfSalesUnit', cls: 'unEdit-pq-col' });
}                 
}

if(sforce.console.isInConsole()) {
sforce.console.setTabUnsavedChanges(true, undefined);
editSign = true;
}
});

I think these parts caused the problem. But it works well with old version (2.1.0)

10
Hi team,

I have a problem want to confirm.
Please have a look with my codes:

Code: [Select]
{ title: "Product",  dataIndx: "product",width: 130,
editor: {
type: "select", options: productArray,style: 'width:230px;'
},
render: function (ui) {                             
//return (ui.cellData.split(':')[0]);
if(ui.cellData == '' || ui.cellData == null){
return '';
}
else{
return (ui.cellData == '' ? '' : ui.cellData.split(':')[0]);
}   
},
editable: function(ui){
var rowIndx=ui.rowIndx;
[b]var status = ui.rowData['status'];[/b]
if(status == 'SPR Counter Offer'){
return false;
}
else{       
return true;   
}
}
}

I have another column which index is "status". In previous version(2.1.0) I can get the status value by "ui.rowData['status']". But now when I test it with new version(2.4.1) the "ui.rowData" is undefined. But I can use this in render function.

Is there have any problem with my codes?


Thank you!

Please have a look with the attached screenshot.
And the following info:
Code: [Select]
<link rel="stylesheet" href="{!URLFOR($Resource.jqueryPPP, 'jquery-ui.css')}" />
   
    <script src="{!URLFOR($Resource.jqueryPPP, 'jquery.min.js')}"></script>
    <script src="{!URLFOR($Resource.jqueryPPP, 'jquery-ui.min.js')}"></script>
   
    <script src="/support/console/32.0/integration.js" type="text/javascript"></script>

    <!--ParamQuery Grid files-->
    <link rel="stylesheet" href="{!URLFOR($Resource.paramQuery241, 'pqgrid.min.css')}" />
    <!--<link rel="stylesheet" href="{!URLFOR($Resource.paramQuery241, 'pqSelect/pqselect.min.css')}" />-->
    <script src="{!URLFOR($Resource.paramQuery241, 'pqgrid.min.js')}"></script>
    <!--<script src="{!URLFOR($Resource.paramQuery241, 'pqSelect/pqselect.min.js')}"></script>-->

11
Hi team,

I have a problem want to confirm.
Please have a look with my codes:

Code: [Select]
{ title: "Product",  dataIndx: "product",width: 130,
editor: {
type: "select", options: productArray,style: 'width:230px;'
},
render: function (ui) {                             
//return (ui.cellData.split(':')[0]);
if(ui.cellData == '' || ui.cellData == null){
return '';
}
else{
return (ui.cellData == '' ? '' : ui.cellData.split(':')[0]);
}   
},
editable: function(ui){
var rowIndx=ui.rowIndx;
[b]var status = ui.rowData['status'];[/b]
if(status == 'SPR Counter Offer'){
return false;
}
else{       
return true;   
}
}
}

I have another column which index is "status". In previous version(2.1.0) I can get the status value by "ui.rowData['status']". But now when I test it with new version(2.4.1) the "ui.rowData" is undefined. But I can use this in render function.

Is there have any problem with my codes?


Thank you!

12
Class of grid header cell can be combined with it to make the rule applicable to grid header cell only.

.pq-grid-col[pq-col-indx="11"]{
    background-color: #8B008B;
    color: white;
}

It works now. Thanks for your answer.

13
Hi team,

I just use 2.4.1 in my page. And my last version is 2.0.4.

With my last version, there is a attribute in each column (pq-grid-col-indx), then I can use this attribute set the color for the corresponding column but only for the head row.

As the following code:
Code: [Select]
[pq-grid-col-indx="11"]{
    background-color: #8B008B;
    color: white;
}


But now when I used 2.4.1, I can't find this attribute any more. I only have the "pq-col-indx". And if I use this attribute, the whole column will have color not the head row.

So is that any way can only change the bg color for grid head ?


Thank you!

14
Help for ParamQuery Pro / Re: How to add cell comments when use render
« on: April 27, 2015, 07:32:58 pm »
Hello noctrona

Yes you can still add comments to the cell.

commentRender is only used to show a small comments icon in the cell which acts as an indicator that the cell has comments, it's not mandatory for comments functionality.

My paramquery version is "2.1.0". Is this version support "pq_cellattr"? I try it but can't see the commends logo on my cell.

And it looks the "attr" is conflict with my jquery...

15
Help for ParamQuery Pro / How to add cell comments when use render
« on: April 27, 2015, 05:23:06 pm »
Hi team,

I just check our pro demo found we can add comments for each cell. But I have a column used "render" to generate the cell contents. So is that possible add comments for this?

Code: [Select]
{ title: "Line Item Status", width: 64,align: "center",editable: false,dataIndx: "status", render: goPR }
"goPR" is one js method.


Thank you!

Pages: [1] 2 3 ... 6