Nested user controls issue

S

sri_san

Having an issue with Gridview wrapped in nested controls

Level 1 - Main aspx page
Level 2 - <uc1> -- repeater control
Level 3 - <uc2> -- gridView control

I am having a problem when in edit mode for the gridview.
The edit index is set to the appropriate index when clicked on "edit"
but when clicked on "update", I figured the gridview losses its
editindex and also I am having a tuff time getting a handle of the
controls using findcontrol. The code being used in uc2 onRowUpating is
as follows:
gv1.Rows[e.RowIndex].FindControl("txtSample")))
// a txtBox in the gridview returns null all
the time.

In the HTML source, i can see the control being created as per the
convention which is something like --


UserControl1_ChildUserControl1_ctl00_nControl_gv1_ctl02_txtSample



Any help would be great!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top