前台代码:

<form />
                    </CustomConfig>
                </ext:CheckboxSelectionModel>
            </SelectionModel>
        </ext:GridPanel>

 后台:

 


        [AjaxMethod]
        public void GridPanel1_Command(string command, string id)
        {
            if (command == "Edit")
            {

             。。。。。。。。。。

                  }

  else if (command == "Delete")
            {

       。。。。。。。。

}

二:
前台

<DirectEvents>

            <Command OnEvent="Command">

                <ExtraParams>

                    <extnet:Parameter Name="Id" Value="record.data.Id" Mode="Value" />

                    <extnet:Parameter Name="command" Value="command" Mode="Raw" />

                </ExtraParams>

               <Confirmation BeforeConfirm="if (command=='attach') return false;" ConfirmRequest="true" Message="Are you sure you want to delete" Title="Delete" />

            </Command>

        </DirectEvents>

后台

protected void Command(object sender, DirectEventArgs e)

    {

        var command = e.ExtraParams["command"].ToString();

        var Id = ConvertHelper.ToInt(e.ExtraParams["Id"].ToString());

 

 

        X.Msg.Alert("Command", e.ExtraParams["id"] + " : " + e.ExtraParams["command"]).Show();

    }

 

相关文章: