Our blazing fast Grid component built with pure JavaScript


Post by saurabhdesai »

Hi Bryntum team,

  • I want to implement bulk actions on grid data as shown in the attachment.

    Demo.mov
    (212.89 KiB) Downloaded 57 times

    So I tried your selectionMode method to implement the same. But I cannot find a way to add a clickable icon in the header to show a header context menu Refer to snapshot for your reference.

    selectionMethod.png
    selectionMethod.png (26.56 KiB) Viewed 372 times

    So is there any way we can add a clickable icon in the header of selectionMode and give the onclick on it to display our custom header context menu.

  • I also tried your checkColumn method to implement the same but in that method, the checkbox toggles on double click. Please refer attachment.

    checkColumnMethod.mov
    (2.87 MiB) Downloaded 52 times

    Like on the first click all the renderers get called and on the second click checkbox toggles itself. And also can you suggest a way to show the custom header context menu with a single click of an icon as shown in Demo.mov.


Post by alex.l »

Try to manually add https://bryntum.com/docs/grid/api/Grid/column/CheckColumn
as first column in case you want to have custom logic for that.
Using https://bryntum.com/docs/grid/api/Grid/column/Column#config-headerRenderer you can render custom HTML for the header, as example render https://bryntum.com/docs/grid/api/Core/widget/Checkbox into it. https://bryntum.com/docs/grid/api/Core/widget/Checkbox#config-appendTo will allow to render widget into container you desire.
https://bryntum.com/docs/grid/api/Grid/column/CheckColumn is based on https://bryntum.com/docs/grid/api/Grid/column/WidgetColumn
so checkbox inside is just a https://bryntum.com/docs/grid/api/Core/widget/Checkbox widget which has https://bryntum.com/docs/grid/api/Core/widget/Checkbox#event-click
event that you need to subscribe on and prevent default behaviour and open https://bryntum.com/docs/grid/api/Core/widget/Menu instead.
Here is code snippet how to manage widget inside CheckColumn https://bryntum.com/docs/grid/api/Grid/column/CheckColumn#snippet

All the best,
Alex


Post by saurabhdesai »

Hey Team,

Can we render our own react component inside headerRenderer. I am trying to return react component in the headerRenderer , But it is not working.PFA code.

Screenshot 2022-09-21 at 1.47.58 PM.png
Screenshot 2022-09-21 at 1.47.58 PM.png (21.28 KiB) Viewed 353 times

.


Post by alex.l »

We do not support using JSX in headerRenderer now. We have a feature request to add that here https://github.com/bryntum/support/issues/774

All the best,
Alex


Post Reply