[CLOSED] How can I make ImageCommandColumn pass a Parameter

  1. #1

    [CLOSED] How can I make ImageCommandColumn pass a Parameter

    this is a gridpanel ,in the gridpanel,have a ImageCommandColumn ,I want to pass a parameter which name is 'parentcode',
    this is my code.
     <ext:ImageCommandColumn runat="Server">
                                        <ext:ImageCommand runat="Server" CommandName="Add" Icon="TableEdit" Text="Add"></ext:ImageCommand>
                                        <Command OnEvent="OnAdd_Click">
                                                <ext:Parameter runat="Server" Name="parentcode" Value="record.data.ParentCode" Mode="Raw"></ext:Parameter>
     if (Request.Params["parentcode"]==null)
    but I can't get the parameter
    Last edited by Daniil; Jun 18, 2013 at 4:53 AM. Reason: [CLOSED]
  2. #2
    Hi @tobros,

    Please access the parameter via
    instead of
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
            if (!X.IsAjaxRequest)
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                    new object[] { "test1", "test2", "test3" },
                    new object[] { "test4", "test5", "test6" },
                    new object[] { "test7", "test8", "test9" }
        protected void OnAdd_Click(object sender, DirectEventArgs e)
            X.Msg.Alert("OnAdd_Click", e.ExtraParams["test1"]).Show();
    <!DOCTYPE html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:GridPanel ID="GridPanel1" runat="server">
                    <ext:Store runat="server">
                            <ext:Model runat="server">
                                    <ext:ModelField Name="test1" />
                                    <ext:ModelField Name="test2" />
                                    <ext:ModelField Name="test3" />
                <ColumnModel runat="server">
                        <ext:Column runat="server" Text="Test1" DataIndex="test1" />
                        <ext:Column runat="server" Text="Test2" DataIndex="test2" />
                        <ext:Column runat="server" Text="Test3" DataIndex="test3" />
                        <ext:ImageCommandColumn runat="server">
                                    Text="Add" />
                                <Command OnEvent="OnAdd_Click">
                                            Mode="Raw" />

Similar Threads

  1. [CLOSED] How to pass parameter when using HttpWriteProxy
    By Daly_AF in forum 1.x Premium Help
    Replies: 2
    Last Post: Apr 16, 2012, 10:46 PM
  2. Pass Parameter to store at runtime
    By Vaishali in forum 1.x Help
    Replies: 0
    Last Post: Feb 07, 2012, 7:58 AM
  3. pass parameter by selected row in grid panel
    By vahid.ch in forum 1.x Help
    Replies: 0
    Last Post: Dec 19, 2011, 12:05 PM
  4. How to pass object as a parameter?
    By diegovbs in forum 1.x Help
    Replies: 1
    Last Post: Jan 04, 2011, 6:53 PM
  5. Replies: 18
    Last Post: Mar 17, 2010, 3:40 PM

Posting Permissions