This is a migrated thread and some comments may be shown as answers.

Getting Sender Grid Info in Usercontrol

1 Answer 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 28 Dec 2011, 10:39 PM
Hello,
    I was wondering is their away to get the sender grid information in the usercontrol, when I have two grid using the same usercontrol.

GridA   --  GridB   -- Using usercontrol.ascx - Need to know if it's GridA or GridB when it's a GridInsertionObject?  Base on this demo with exceptions of two grids.

Thank you for your help.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Dec 2011, 05:25 AM
Hello Paul,

Try the following code.
C#:
protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)
{
  GridEditFormInsertItem item = (GridEditFormInsertItem)e.Item;
  RadGrid grid = (RadGrid)item.FindControl("RadGrid 2");
}

-Shinu.
Tags
Grid
Asked by
Paul
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or