Dropdown menu in command column

Good afternoon!

How can I put a dropdown menu in comand column? And if it not possible, how can I create a template to put a button and a dropdown menu on a grid column?

Thanks in advance!



1 Reply

RS Renjith Singh Rajendran Syncfusion Team October 20, 2021 08:55 AM UTC

Hi Társis, 

Greetings from Syncfusion support. 

We have inbuilt Column Template support in grid. With this you can render and display your custom components inside Grid column. Please refer the below documentations for more details, 

Please refer the code below, 

 
<GridColumn HeaderText="Employee Image" TextAlign="TextAlign.Center" Width="120"> 
    <Template> 
        @{ 
            var employee = (context as EmployeeData); 
        } 
        <SfButton IconCss="e-icons e-plus-icon"></SfButton> 
        <SfDropDownButton Content="Edit"> 
            <DropDownMenuItems> 
                <DropDownMenuItem Text="Cut"></DropDownMenuItem> 
                <DropDownMenuItem Text="Copy"></DropDownMenuItem> 
                <DropDownMenuItem Text="Paste"></DropDownMenuItem> 
            </DropDownMenuItems> 
        </SfDropDownButton> 
    </Template> 
</GridColumn> 


Please refer the screenshot below, 
 


References :  

Please get back to us if you need further assistance. 

Regards, 
Renjith R 


Loader.
Up arrow icon