Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call a function from MtxGridColumn #3

Closed
VinitVishwanathan opened this issue Apr 6, 2020 · 2 comments
Closed

call a function from MtxGridColumn #3

VinitVishwanathan opened this issue Apr 6, 2020 · 2 comments
Labels
area: data-grid Issues about data grid help wanted Extra attention is needed

Comments

@VinitVishwanathan
Copy link

VinitVishwanathan commented Apr 6, 2020

I have a column which is a link. want to add a click event in that.
format: (data: any) => { return <a (click)="callfunction()" >${data.Status} </a>; }
tried this, but the function is not getting called. What am I doing wrong?

I also tried keeping it a button. It worked but the text was not displayed. Is Icon mandatory in Grid button. can't we keep text only? The text should change dynamically as shown in the format. Is that possible?

 {
      title: 'Status',
      index: 'Status',
      type: 'button',
      fixed: 'left',
      width: 'auto',
      sort: true,
      checked: true,
      disabled: false,
      buttons: [
        {
          icon:null,
          text:'abc',
          tooltip: 'Edit Template Attribute',
          type: 'link',
          click: ()=>{alert("hi")},
        }]
      // format: (data: any) => { return `<a (click)="onGoToPage2()">${data.Status} </a>`; }
    }.

Thanks in advance

@nzbin nzbin changed the title call a function from MXGridColumn call a function from MtxGridColumn Apr 7, 2020
@nzbin nzbin added the help wanted Extra attention is needed label Apr 7, 2020
@nzbin
Copy link
Member

nzbin commented Apr 12, 2020

@VinitVishwanathan I have refacted the data grid, you can view the demos.

@VinitVishwanathan
Copy link
Author

Thanks a lot..

@nzbin nzbin closed this as completed Apr 12, 2020
@nzbin nzbin added the area: data-grid Issues about data grid label Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: data-grid Issues about data grid help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants