How would I make it so by default in the image given, the Recipient Postal Code and below fields are unchecked by default and their columns are hidden. I am using setReport() and not runQuery(). I would like the checkboxes to just be unchecked and the columns to be hidden but when I do check the checkbox the column appears like usual.
Hello Edward,
Thank you for reaching out to us.
If we understand your request correctly, you're interested in checking the columns checkboxes via UI each time the report is set. It can be achieved using the showDefaultSlice
property of the Options object:
let report = {
dataSource: {
filename: "data/data.csv"
},
options: {
grid: {
type: "flat"
},
showDefaultSlice: false,
}
}
flexmonster.setReport(report);
You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/fhzxko5r/
Also, could you please let us know if you already have Flexmonster license? This will help us to better analyze your use case based on our internal records.
Looking forward to hearing from you.
Kind regards,
Nadia
I want some specific fields to default as unchecked while others are checked and visible.
How do I make a specific few fields in there unchecked and their columns hidden while the other ones default as checked and their columns shown.
Hello,
Thank you for the details.
To show the specific columns on the grid, you can define the slice
property of the Report Object:
let report = {
dataSource: {
filename: "data/data.csv"
},
slice: {
columns: [{
uniqueName: "Category"
},
{
uniqueName: "Color"
},
{
uniqueName: "Size"
},
]
},
...
}
flexmonster.setReport(report);
Feel free to check the following JSFiddle: https://jsfiddle.net/flexmonster/rpgeL52h/.
Please let us know if it works for you. Looking forward to hearing from you.
Kind regards,
Nadia
Hello,
Hope you are doing well.
We were wondering if you had a chance to check the suggested solution. Could you please let us know if it works for you?
Looking forward to hearing your feedback.
Kind regards,
Nadia