ext.net怎样获取gridpanel里所有的数据
1个回答
展开全部
页面:
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
<Listeners>
<RowSelect Handler="setSelectIndex(rowIndex);#{frompanel}.getForm().loadRecord(record);" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
js代码:
function setSelectIndex(index) {
document.getElementById("hid_index").value = index;
}
var index = document.getElementById("hid_index").value;
var id = StoreInvoice.getAt(index).get('InvoiceId');
s里已经取到gridpanel的store中某个单元格的值,放进隐藏域
//关联终端
string[] item_terminalid = this.hid_item_terminalid.Text.Trim().Split(',');
if (item_terminalid.Length > 0)
{
for (int i = 0; i < item_terminalid.Length; i++)
{
if (item_terminalid[i] != "" && item_terminalid[i] != null)
{
MsecTerminalManagementInfo terminal = base.ManagerFactory.terminalManagementSrv.Get(int.Parse(item_terminalid[i]));
obj.MsecTerminalManagementInfos.Add(terminal);
}
}
}
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server">
<Listeners>
<RowSelect Handler="setSelectIndex(rowIndex);#{frompanel}.getForm().loadRecord(record);" />
</Listeners>
</ext:RowSelectionModel>
</SelectionModel>
js代码:
function setSelectIndex(index) {
document.getElementById("hid_index").value = index;
}
var index = document.getElementById("hid_index").value;
var id = StoreInvoice.getAt(index).get('InvoiceId');
s里已经取到gridpanel的store中某个单元格的值,放进隐藏域
//关联终端
string[] item_terminalid = this.hid_item_terminalid.Text.Trim().Split(',');
if (item_terminalid.Length > 0)
{
for (int i = 0; i < item_terminalid.Length; i++)
{
if (item_terminalid[i] != "" && item_terminalid[i] != null)
{
MsecTerminalManagementInfo terminal = base.ManagerFactory.terminalManagementSrv.Get(int.Parse(item_terminalid[i]));
obj.MsecTerminalManagementInfos.Add(terminal);
}
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询