Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- view: 'icon',
- type: 'icon',
- icon: 'plus-square',
- tooltip: 'Add',
- batch: 'dataGrid',
- click() {
- let grid = <DataGridView>that.getGrid();
- let sObject = grid.getObject();
- let win = <GridWindowView>webix.ui(grid.recordEditWindow);
- if (!sObject) {
- webix.message({
- text: 'Please select an Object',
- type: 'error',
- expire: 3000
- });
- return;
- }
- win.CF_grid = grid;
- win.show();
- let closeCallback = (reloadData) => {
- win.close();
- if (reloadData) {
- grid.loadViewData();
- }
- };
- let renderCallback = () => {
- win.resize();
- };
- grid.loadEditRecordComponent(
- grid.getObject(),
- null,
- 'recordEditComponentContainer',
- 'recordEditComponentMessage',
- closeCallback,
- renderCallback
- );
- }
- /*click() {
- let grid = <DataGridView>that.getGrid();
- let recId = grid.add({
- id: `-${webix.uid()}`,
- Id: this.NEW_ID
- }, 0);//add blank record to the top
- let defaults = (<DataGridConfig>grid.config).CF_addRecordDefaults;
- for (let val in defaults) {
- grid.processCellUpdate(null, defaults[val], recId, val);
- }
- },*/
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement