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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top