ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: Jignesh on February 06, 2020, 12:53:45 pm
-
Hi Paramvir,
I have gone through this link https://paramquery.com/pro/api#option-column-type .
I have created checkbox on contextmenu succefully,
But issue are following:
1) how to set background color for new column when click on checkbox (attached screenshot-->chk_1.png)
2) Value reset for new column checkbox on click checkbox or update text in same row. (attached screenshot--> chk_2.png)
Below are JSFiddle link:
https://jsfiddle.net/cherishPatel/h9514zLj/2/
Thanks,
Jignesh
-
Please use Columns().add() API to add new columns.
-
Hi Paramvir,
I have tried Column().add() method but it was not worked for below scenarios as mentioned upper post.
Below is jsfiddle for same:
https://jsfiddle.net/cherishPatel/oy2rq73d/2/
1)how to set background color for the new column when clicking on the checkbox (attached screenshot-->chk_1.png)
2) Value reset for new column checkbox on click checkbox or update text in the same row. (attached screenshot--> chk_2.png)
I have already added the screenshots for the first post of this thread.
Please give me your feedback.
Thanks,
Jignesh
-
1. Please add render callback to data column.
render: function(ui){
if(ui.rowData[dataIndx of checkbox column] =='YES'){
return {
style: {background: "#ff0000"}
}
}
},
and use check event to refresh the data column when checkbox is checked/unchecked.
check: function(evt, ui){
if(ui.dataIndx == 'dataIndx of checkbox column')
this.refreshColumn({dataIndx: 'dataIndx of data column'})
},
2. Please make adding new grouped columns a 2 step process. First add parent "New Column" column, then add its children columns with Columns.add() API separately.
-
Hi Paramvir,
I have not clearly understand, Can you please edit jsfiddle which I have given in this thread?
It is big help for me.
Thanks,
Jignesh
-
Hi Paramavir,
Are you look into this?, Please give me sample jsfiddle code or edit my jsfiddle code. So I can take refrensh from them.
Thanks,
Jignesh
-
Jignesh
Please check this example: https://stackblitz.com/edit/paramquery-checkbox-columns?file=index.js