-1

Is it possible to add asp.net server button as one of the columns in iggrid ?

OR

Is it possible to add HTML button to run at server in one of the columns in iggrid ?

The reason for this is : i need to call server methods from this button

My iggrid column formation is below

$(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);
    }

});
4

1 回答 1

0

igGrid是一个客户端控件,不像本机 Web 窗体控件那样具有服务器端呈现。igGridHTML 结构呈现在客户端上,Web 窗体控件呈现在服务器上。这意味着您不能添加客户端模板,例如,在igGrid单元格内呈现服务器端控件。事件如果您在服务器上呈现服务器端控件,然后将其移动igGrid到客户端的单元格内,您仍然不会获得任何与 相关的服务器端事件参数igGrid,例如按钮位于哪一行,哪一列, 什么细胞, 等等。

于 2015-02-11T13:05:29.090 回答