{"hidden":false,"children":[{"configs":{"itemId":"module","description":"示例中WB_STAFF表和WB_USER表中的EMAIL字段为重名字段，WB_STAFF在字典定义中创建链接字段STAFF_EMAIL链接到EMAIL（也可直接创建STAFF_EMAIL字段）\n示例中WB_STAFF表和WB_USER表基于演示目的使用内部连接，在实际业务中可以建立左、右或外连接\n表格字段顺序依据结果集字段顺序"},"expanded":true,"children":[{"configs":{"layout":"fit","itemId":"viewport1"},"expanded":true,"children":[{"configs":{"itemId":"grid1","editable":"true","multiSelect":"true"},"expanded":true,"children":[{"configs":{"itemId":"store","autoLoad":"true","url":"m?xwl=examples/crud/crud-db-access/multi-select"},"expanded":false,"children":[],"type":"store","events":{"success":"var userEmailCol = Wb.getColumn(store, 'EMAIL');\nuserEmailCol.setText('帐户电子邮件');"}},{"configs":{"itemId":"tbar"},"expanded":true,"children":[{"configs":{"itemId":"newBtn","tooltip":"添加新的记录","text":"添加","iconCls":"record_add_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.addEdit(app.grid1); //更多选项可使用Wb.add方法"}},{"configs":{"itemId":"delBtn","tooltip":"删除选择的记录","text":"删除","iconCls":"record_delete_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"Wb.remove(app.grid1);"}},{"configs":{"itemId":"item1","text":"-"},"expanded":false,"children":[],"type":"item"},{"configs":{"itemId":"saveBtn","tooltip":"保存所有的更改","text":"保存","iconCls":"save_icon"},"expanded":false,"children":[],"type":"item","events":{"click":"if (!Wb.verifyGrid(app.grid1)) //验证数据是否合法\n  return;\nWb.sync({\n  grid: app.grid1,\n  url: 'm?xwl=examples/crud/crud-db-access/multi-save',\n  message: '正在保存中...',\n  success: function(resp) {\n    //把后台返回的KEY_ID和USER_ID同步更新到表格\n    Wb.syncCreate(app.grid1, Wb.decode(resp.responseText));\n  }\n});"}}],"type":"toolbar"}],"type":"grid"}],"type":"viewport"}],"type":"module"}],"roles":{"demo":1},"title":"多表可编辑表格","iconCls":"","inframe":false,"pageLink":""}