CELL EDIT Header

Header is editable but blocked trying to get celledit to fire so filter can be reset.  Is this achievable?



1 Reply

JS Janakiraman Sakthivel Syncfusion Team March 28, 2024 06:21 PM UTC

Hi Stephen Welborn,

We suspect that you will try to edit the header cells, and you are expecting the cellEdit event to trigger on this action. We would like to inform you that currently we don't have the option to edit row and column headers in our spreadsheet. We have handled this like MS Excel's behavior.

 

However, we can change the column header text using the beforeCellRender event, as shown below. For your reference, we have attached the code snippet and sample for this.

 

Code Snippet:


<ejs-spreadsheet id="spreadsheet" beforeCellRender="beforeCellRender"> </ejs-spreadsheet>

 

<script>

    var columnIndexes = [0, 1, 2, 3, 4];

    function beforeCellRender(args) {

        if (columnIndexes.indexOf(args.colIndex) > -1 && args.element.classList.contains('e-header-cell')) {

            var text = 'custom header ' + args.colIndex.toString();

            // Add the custom text to the innerText of the element.

            args.element.innerText = text;

        }

    }

</script>


Sample: Please see the attachment.

https://ej2.syncfusion.com/aspnetcore/documentation/spreadsheet/rows-and-columns#changing-text-in-column-headers

And we have noticed you have mentioned "trying to get cellEdit to fire so the filter can be reset". But we couldn't understand your exact requirement in this case. So, could you please share details of what you are trying to do with the filter by using the cellEdit event? Could you please share your requirements in a step-by-step process for our understanding?

 

If possible, could you please share the video demonstration of your requirement? It will help us to understand your requirements on our end and provide the possible workaround solution to achieve your requirements.


Attachment: WebApplication1_54554be4.zip

Loader.
Up arrow icon