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