Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Template for Column (Binding)
posted

Hi,

I have a grid with some data.

I can display all the data, but some columns I want to style. I have found that you can reach this with e.g. ng-template.

My problem is that I get the styling from an WebAPI as a string

I can define the string in another UI, e.g. 

<ng-template igxCell let-cell="cell">
<ngx-loading [show]="gridConfiguration.isLoading" [config]="loadingConfiguration"></ngx-loading>
{{ cell.value }}
</ng-template>

My question ist how cann I bind the template to this string?

Kind regards,

Patrick

Parents
No Data
Reply
  • 1320
    Offline posted

    Hello Patrick,

    After investigating this further, I determined that the string containing the styles could be parsed to JSON and applied to the igx-column property “cellStyles”. This property could be applied to the column with or without template:

     <igx-column field="ProductName" header="Product Name" [cellStyles]="stylesJson">

    I have prepared a sample, demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics

Children
No Data