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
1415
Change the label of Igx button dynamically
posted

Hi Team,

Using Hierarichal grid load on demand.

Requirement: On page load/ row Toggle, i have a button in Child grid toolbar that i want to dynamically change. I used igxLabel property but it is not displaying the button in toolbar.

Please reply ASAP.

HTML:

<igx-row-island>
                <ng-template igxToolbarCustomContent let-grid="childGrid">
                    <button class="exportButton" (click)="start()" [disabled]= "invalidbtn" igxLabel ="action"
                       igxButton="raised" igxRipple igxRippleCentered="true" [displayDensity]="compact">
                    </button>
                  </ng-template>

            </igx-row-island>

Here action is a global variable that i am setting in rowToggle() method.

Parents
No Data
Reply
  • 1560
    Verified Answer
    Offline posted

    Hello,

    I have been looking into your question and an approach I could suggest is to display the value with interpolation i.e.

     <igx-grid-toolbar [grid]="childGrid" *igxGridToolbar="let childGrid">
            <button igxButton>{{ action }}</button>
      </igx-grid-toolbar>

    A small sample that demonstrates this approach could be found here.

    Let me know if I may be of any further assistance.


    Sincerely,
    Teodosia Hristodorova
    Software Developer

Children