How I can disable the select top-corner button in SpreadSheet

1 Answer 43 Views
Spreadsheet
Hippolythe
Top achievements
Rank 1
Iron
Hippolythe asked on 15 Sep 2023, 01:20 PM

Hello, 

I need to disable the button that selects the entire sheet in SpreadSheet. I tried to hide it with CSS but the button remains active.

 

I have highlighted in yellow the button I am talking about in the screenshot below.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Hippolythe
Top achievements
Rank 1
Iron
answered on 19 Sep 2023, 09:51 AM | edited on 19 Sep 2023, 12:18 PM
I succeeded by passing the Select event to null if I detect the click on the top-corner button.

function onSelect(e: any) { const selectedCellorRange = e.range._ref; if (selectedCellorRange.topLeft && selectedCellorRange.bottomRight) { const topLeft = selectedCellorRange.topLeft; const bottomRight = selectedCellorRange.bottomRight; if (bottomRight.row > 0 && bottomRight.col === totalColumns && topLeft.row === 0 && topLeft.col === 0) { selectedCellorRange.topLeft.row = null; selectedCellorRange.topLeft.col = null; selectedCellorRange.bottomRight.row = null; selectedCellorRange.bottomRight.col = null; }

} }

Nikolay
Telerik team
commented on 22 Sep 2023, 10:34 AM

Hi Hippolythe,

Thank you for sharing the solution with the community. I believe this will be helpful to others facing the same scenario.

Regards,

Nikolay

Tags
Spreadsheet
Asked by
Hippolythe
Top achievements
Rank 1
Iron
Answers by
Hippolythe
Top achievements
Rank 1
Iron
Share this question
or