是否可以添加asp.net服务器按钮作为iggrid中的一列?
或
是否可以在iggrid中的一列中添加HTML按钮以在服务器上运行?
原因是:我需要从这个按钮调用服务器方法
我的iggrid列形成低于
$(function () {
var data = <%= GetAccountInformationJSON() %>;
if ( data != '' )
{
$("#gridAccountInformation").igGrid({
height: ((content_height - HeaderHeight) / 2) +"px",
width: "100%",
columns: [
{headerText: "Account", key:"Account", dataType: "string"},
{headerText: "Office", key:"Office", dataType: "string"},
{headerText: "Balance", key:"Balance", dataType: "number", format: "0#,###"},
{headerText: "Init Mrg", key:"InitMarginReq", dataType: "number", format: "0#,###"},
{headerText: "OTE", key:"OpenTrdEqty", dataType: "number", format: "0#,###"},
{headerText: "Total Eqty", key:"TotalEqty", dataType: "number", format: "0#,###"},
{headerText: "Liq. Val", key:"LiquidatingVal", dataType: "number", format: "0#,###"},
{headerText: "Ex/Def", key:"ExcessDeficit", dataType: "number", format: "0#,###"},
{headerText: "Statement", key:"Statement", dataType: "string"}
]
,
features:[
{
name: "Resizing",
}
],
dataRendered: function (evt, ui) {
ui.owner.element.find("tr th:nth-child(1)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(2)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(3)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(4)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(5)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(6)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(7)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(8)").css("text-align", "center");
ui.owner.element.find("tr th:nth-child(9)").css("text-align", "center");
}
,
dataSource: data //JSON Array defined above
});
$("#gridAccountInformation").igGrid("option", "datasource", data);
}
});
igGrid
是一个客户端控件,不像本机Web窗体控件那样具有服务器端呈现功能。igGrid
HTML结构在客户端上呈现,Web窗体控件在服务器上呈现。这意味着您不能添加客户端模板,例如,在igGrid
单元格内呈现服务器端控件。事件如果您在服务器上呈现服务器端控件,然后将其移动到客户端的igGrid
单元格中,则仍然不会得到任何与igGrid
相关的服务器端事件参数,如按钮位于哪行、哪列、哪单元格等。