Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8661359
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:28:44+00:00 2026-06-12T16:28:44+00:00

I am using Nested User Controls…. Like: I have a ‘A’ User control that

  • 0

I am using Nested User Controls….

Like: I have a ‘A’ User control that contains the grid view then a ‘B’ User Control that contains ‘A’ and one more user control then a ‘C’ user Control that Contains ‘B’ and 2 more user controls…

I want row command in the ‘C’ user control

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T16:28:46+00:00Added an answer on June 12, 2026 at 4:28 pm

    Here is two ways that you can achieve this.

    Expose the grid view with a public property in your A control. In your B control expose the A control as a public property. So in your C control you can write something like

    bControl.aControl.GridProperty.OnRowCommand += youreventhandler;
    

    Or you can define an event on A control such as OnInnerGridRowCommand and raise this event to B control when RowCommand happens. Define another event in B control and raise this new event with appropriate parameters when OnInnerGridRowCommand of A happens. So you can handle this new event in control C.


    This is C user control exposing inner grid

    public GridView GridView_In_C
    {
        get { return innerGrid; }
    }
    

    This is B user control exposing C

    public CWebUserControl C_In_B
    {
        get
        {
            return CWebUserControl_In_B;
        }
    }
    

    This is A user control exposing B

    public BWebUserControl B_In_A
    {
        get
        {
            return BWebUserControl_In_A;
        }
    }
    

    And this is a page, hosting A user control and attaching to RowCommand,

    public partial class HostPage : System.Web.UI.Page
    {
        protected void Page_Init(object sender, EventArgs e)
        {
            AWebUserControlInHostPage.B_In_A.C_In_B.GridView_In_C.RowCommand += new GridViewCommandEventHandler(InnerGridView_RowCommand);
        }
    
        void InnerGridView_RowCommand(object sender, GridViewCommandEventArgs e)
        {
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one UserControl nested inside the other UserControl, something like that: <uc:MyControl1> <uc:MyControl2
I have a simple nested form using the 'nested_form' gem. It looks like this:
I'm using nested pages in Jquery Mobile: Looks like this: // wrap page <div
I have a user control within a user control. I want to reference the
I have a User entity that has a Current Location field (city and country).
I have a drop down list in asp.net using nested for loops in a
I'm using VS2008 SP1 with the WPFToolKit v3.5.50211.1. I have nested WPF UserControls in
I have a rather weird problem with a control that doesn't want to resize.
I'm having difficulty getting the binding to fire off on a user control that
I have a unique sql database setup in which I'm using nested sets to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.