ext.net怎样获取gridpanel里所有的数据
展开全部
页面:
<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);
}
}
}
更多追问追答
追问
能获取到这个gridpanel里所有的数据吗?
追答
可以的 你先试一下
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询