Customize command

Hi, have a nice day. I want to customize the command but I can't find a list of icons for it. Can you help me?



3 Replies

RS Rajapandiyan Settu Syncfusion Team July 27, 2021 12:07 PM UTC

Hi Toan, 
 
Thanks for contacting Syncfusion support. 
 
Based on your query, we suspect that you want to customize the command button in EJ2 Grid. In the iconCss property of command column, you can bind the CSS class as you want. By using this class you can render the icons in the command button. Please find the below code example and documentation for your reference. 
 
 
 
[app.component.html] 
 
 
    <ejs-grid [dataSource]='data' allowPaging='true' [toolbar]="toolbar" [editSettings]='editSettings' 
        (commandClick)='commandClick($event)'> 
        <e-columns> 
            ---- 
            <e-column headerText='Manage Records' width='160' [commands]='commands'></e-column> 
        </e-columns> 
    </ejs-grid> 
 
 
 
[app.component.ts] 
 
 
@Component({ 
  selector: 'app-root', 
  templateUrl: 'app.component.html', 
  styleUrls: ['app.component.css'], 
  encapsulation: ViewEncapsulation.None, 
  providers: [EditServicePageServiceCommandColumnService] 
}) 
export class AppComponent { 
  --- 
  public commandsCommandModel[]; 
 
  public ngOnInit(): void { 
    --- 
    this.commands = [ 
      { 
        buttonOption: { 
          content: 'Details', 
          iconCss: 'e-icons customicon', 
          cssClass: 'e-flat' 
        } 
      } 
    ]; 
  } 
} 
 
 
 
[app.component.css] 
 
 
.customicon::before { 
  content'\e267'; // bind the icon as you want 
} 
 
 
 
 
Find the list of available icons in the EJ2 Components from the below link,

https://ej2.syncfusion.com/angular/documentation/appearance/icons/#available-icons

please get bac to us if you need further assistance with this. 
 
Regards, 
Rajapandiyan S 



TB Toan Bui July 29, 2021 02:33 AM UTC

I did it. Thank you so much



RS Rajapandiyan Settu Syncfusion Team July 29, 2021 04:27 AM UTC

Hi Toan, 
 
We are glad that you have achieved your requirement.

please get back to us if you need further assistance. 
 
Regards, 
Rajapandiyan S 


Loader.
Up arrow icon