Hello,
I have been trying to replace commandButton with my button, and what I found to do that, I have to do in a customized template that includes my icon, however, I don't understand why they're not being displayed.
I tried to use your CommandButtons and they do work, but I can't edit the button themselves even in cssClass, so guidance on which option can be solved is appreciated.
Mainly, I want to use my local icons, that's all.
PS: you can uncomment the "DataManger" code to consume the data locally if you want
PS: I tried "SVG" and "SVGinline" in HTML, and still nothing.
Attachment: datatable_e49d6efb.rar
Looking forward to hear from you at the earliest!
|
App.component.html
<ejs-grid [dataSource]='data' [selectionSettings]='selectionOptions' height='315px'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=120></e-column>
<e-column field='CustomerID' headerText='Customer ID' width=150></e-column>
<e-column field='ShipCity' headerText='Ship City' width=150></e-column>
<e-column field='ShipName' headerText='Ship Name' width=150>
<ng-template #template let-data>
<div class="image">
<img style="width:24px;height:24px" src="./assets/images/a/b/meal.svg"/>
</div>
</ng-template>
</e-column>
</e-columns>
</ejs-grid>
|
Hello again,
Conclusion :
Well based on what you've proposed, it seems it became visible when I replaced [InlineSVG] with <img>.
however, using <img> instead won't allow the SVG to change color based on the HTML and CSS I provided, importing SVG in <img> won't allow it to change and be filled based on the CSS. Therefore I had to use inline implementation of SVG within the "#image.div" brackets.
Question 2:
How to fire events from the grid's customized icons upon clicking them?
Replacing the onCommandClick() method?
|
<e-column field='ShipName' headerText='Ship Name' width=150>
<ng-template #template let-data>
<div class="image">
<img style="width:24px;height:24px" (click)="clicked($event)"
src="./assets/images/a/b/meal.svg"/>
</div>
</ng-template>
</e-column>
. . . .
clicked(){
console.log("triggered");
}
|
Hello,
Well, as an update, I solved the icon/button issue, however, I have a column which supposed to have an image.
but as it seems, it's not displaying the images.
It stays blank.
even alt doesn't display a thing.
|
App.component.html
<ejs-grid [dataSource]='data' [selectionSettings]='selectionOptions' height='315px'>
<e-columns>
<e-column field='OrderID' headerText='Order ID' textAlign='Right' width=120></e-column>
<e-column field='CustomerID' headerText='Customer ID' width=150></e-column>
<e-column field='ShipCity' headerText='Ship City' width=150></e-column>
<e-column field='ShipName' headerText='Ship Name' width=150>
<ng-template #template let-data>
<div class="image">
<img style="width:24px;height:24px" src="./assets/images/a/b/meal.svg"/>
</div>
</ng-template>
</e-column>
<e-column headerText='Ficher' width=150>
<ng-template #template let-data>
<div class="image">
<img style="width:24px;height:24px" (click)="clicked($event)" alt="alternative" src="./assets/images/a/b/raphael.jpg"/>
</div>
</ng-template>
</e-column>
</e-columns>
</ejs-grid>
|
Hello again!
are these the versions you've mentioned? And, It still shows nothing.
If the information above doesn't help, I'll send the sample after you confirm the screenshot above.
Unfortunately, I'm still unable to display it as you've showcased.
Here's the sample and thank you in advance.
|
<e-column headerText="Fichier" width="75">
<ng-template #template let-file>
<div class="image">
<img
style="width: 24px; height: 24px"
src="./assets/images/logo.jpg"
alt="text"
/>
</div>
</ng-template
></e-column>
|
Hi,
I am... So sorry for wasting your time, on such a trivial matter.
Thank you, that was the problem indeed.
Have a nice day, and sorry. (╥﹏╥)