The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
Is it possible to put a clickable icon on the grid header so that I can click on the icon and get a different context menu for each column?
Thanks for your help.
Aaron
ADAdministrator Syncfusion Team May 22, 2003 07:26 PM UTC
There are several ways you can do this. If you want a bitmap button, you can use the technique illustrated in the Syncfusion\Essential Suite\Grid\Samples\in Depth\CellButtons sample. There is an Ellipsis button there that is a bitmap button. You could put this in a column header.
You could also make the header cell a Static CellType, and add an ImageList and ImageIndex to the cell style. This shoul ddiplay an icon. To catch the click, you could handle the CellClick event and check if the click is on your column header.
You could also just catch CellClick and test for e.RowIndex = 0 to get a header click. Then you could just display a context menu based on the e.ColIndex value. (This would be wothout using an icon.)