binding.js with 1.0 - Ext JS

本文介绍了一种将表格数据绑定到表单的方法,并监听选择模型的'rowselect'事件来实现数据绑定。此外,还讨论了数据绑定及将更新发送到服务器组件的相关工作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Are there plans to put the binding.js into the 1.0 version? Or am I overlooking a new way of binding the record to a form, and updateing the grid when the form is updated?
Reply With Quote
  #2  
Old 02-28-2007, 08:37 PM
Default

Binding grid data to a form:

Listen to the 'rowselect' event of your selection model:
sm.on('rowselect', this.bindData, this, true);

My bindData function looks like so:
bindData : function(sm, rowIdx){
/* retrieve the current row from the data store */
var currRow = ds.getAt(rowIdx);
/* update form elements */
Ext.fly('book-title-form').dom.value = currRow.get('TITLE');
Ext.fly('book-isbn-form').dom.value = currRow.get('ISBN');
Ext.fly('book-keywords-form').dom.value = currRow.get('KEYWORDS');
Ext.fly('book-description-form').dom.value = currRow.get('DESCRIPTION');
}

As far as the data marshalling is concerned and sending updates to a server-side component this is something that Jack is currently working on and something that I know I am looking forward to a lot.
Reply With Quote
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值