Create custom TableView

Is it possible to create a custom TableView instance by using extends DG.TableView? If it is possible, how to do so so and how to initiate such a custom TableView?

Hi! Do you mean something like this?

class CustomTableView extends DG.TableView {
  someProperty?: string;

  constructor(table: DG.DataFrame) {
    super(DG.TableView.create(table).dart);
    this.someProperty = 'test property';
  }
}

//name: Test App
//tags: app
export function myApp() {
  let t = grok.data.demo.demog();
  let ctv = new CustomTableView(t);
  grok.shell.addView(ctv);
  console.log(ctv);
}
2 Likes

Not sure this is the best way possible. Do you have any suggestions / requests for API?

Awesome this works, thanks sharing!

1 Like