avc
November 12, 2023, 9:31am
3
Hi @Debjit_Bhattacharjee :
Maybe you have not solved yet …
This code define an event wich will triggered when user click on any button in the grid footer. You can customize it to “hearing” just one button (if you need different behavior on each button …)
refresh(frm){
$(frm.wrapper).find(".grid-footer").on("click",function(evt){
console.log('Pagination buttons pressed')
your_color_logic_here()
})
}
@girumtibebu try this:
To hide grid columns using custom script, you can call this function at your desired event:
function removeColumns(frm, fields, table) {
let grid = frm.get_field(table).grid;
for (let field of fields) {
grid.fields_map[field].hidden = 1;
}
grid.visible_columns = undefined;
grid.setup_visible_columns();
grid.header_row.wrapper.remove();
delete grid.header_row;
grid.make_head();
for (let row of grid.grid_rows) {
if (row.open_…
Hope this helps.
2 Likes