Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Problem in firing the ItemCommand event of ingragistics webgrid
posted

Hi,

I am facing an issue in firing the ItemCommand event of infragistics webgrid, the description of which is as follows

I have a link button control through out a column in infragistics webgrid which is binded to database. My application's functionality demands fetching some value through a web service upon clicking the link button. Also i have certain code written in webgrid's Click and ActiveRowChange events. Now when i click on the link button, i am not able to get through the ItemCommand event of webgrid. I have written the code to call my webservice in ItemCommand event. I expect that event to fire when i click the link button.

Any kind of help would be highly appreciable.

Thanks

Ashish

Parents
No Data
Reply
  • 7694
    posted

    Hello,

    I am trying to reproduce the issue, unfortunately to no avail.  I use NetAdvantege 8.3.
    Please take a look at the code below:

    Aspx:
    <igtbl:UltraWebGrid ID="UltraWebGrid1"  DataSourceID="SqlDataSource1" runat="server">
            
            <Bands>
                <igtbl:UltraGridBand>
                    <Columns>
                        <igtbl:TemplatedColumn>
                            <CellTemplate>
                                <asp:LinkButton ID="LinkButton1" CommandName="DELL" runat="server">LinkButton</asp:LinkButton>
                            </CellTemplate>
                        </igtbl:TemplatedColumn>
                        <igtbl:UltraGridColumn Key="ProductName" BaseColumnName="ProductName" Type="Button"
                            HeaderText="ProductName">
                            <Footer Key="ProductName">
                            </Footer>
                            <Header Key="ProductName" Caption="ProductName">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn Key="ProductName" BaseColumnName="ProductName" Type="HyperLink"
                            HeaderText="ProductName">
                            <Footer Key="ProductName">
                            </Footer>
                            <Header Key="ProductName" Caption="ProductName">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn Key="ProductName" BaseColumnName="ProductName" HeaderText="ProductName">
                            <Footer Key="ProductName">
                            </Footer>
                            <Header Key="ProductName" Caption="ProductName">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn Key="SupplierID" BaseColumnName="SupplierID" HeaderText="SupplierID">
                            <Footer Key="SupplierID">
                            </Footer>
                            <Header Key="SupplierID" Caption="SupplierID">
                            </Header>
                        </igtbl:UltraGridColumn>
                        <igtbl:UltraGridColumn Key="CategoryID" BaseColumnName="CategoryID" HeaderText="CategoryID">
                            <Footer Key="CategoryID">
                            </Footer>
                            <Header Key="CategoryID" Caption="CategoryID">
                            </Header>
                        </igtbl:UltraGridColumn>
                    </Columns>
                </igtbl:UltraGridBand>
            </Bands>
        </igtbl:UltraWebGrid>
    C#
    protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            UltraWebGrid1.ActiveRowChange += new Infragistics.WebUI.UltraWebGrid.ActiveRowChangeEventHandler(UltraWebGrid1_ActiveRowChange);
            UltraWebGrid1.Click += new Infragistics.WebUI.UltraWebGrid.ClickEventHandler(UltraWebGrid1_Click);
            UltraWebGrid1.ItemCommand += new Infragistics.WebUI.UltraWebGrid.ItemCommandEventHandler(UltraWebGrid1_ItemCommand);

        }

        void UltraWebGrid1_ActiveRowChange(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
        {
            
        }

        void UltraWebGrid1_Click(object sender, Infragistics.WebUI.UltraWebGrid.ClickEventArgs e)
        {
        }

        void UltraWebGrid1_ItemCommand(object sender, Infragistics.WebUI.UltraWebGrid.UltraWebGridCommandEventArgs e)
        {

        }
        protected void Page_Load(object sender, EventArgs e)
        {

        }

    Could you please send a little bit more information about the UltraWebGrid declaration.  ASPX declaration, code-behind – anything that can get us started is welcome. Because can be have many reason for that issue.

    Thanks.

Children