views:

335

answers:

0

Hi

I've created an ASCX control with a GridView and a DetailsView associated to the GridView, both have a DataSource associated.

The ASCX works fine when there's only one in the page, as soon as I add the second one (both with distinct event handlers and parameters) I start having problems with the second control.

The first control keeps working just fine but the second has these problems:

  • If the detailsView is in "Insert" mode and I click one of the elements in the grid, it stays in "Insert" mode instead of changing to "ReadOnly" and displaying the values of the selected item.
  • When I insert a new element to the GridView using the DetailsView, the item is inserted but the grid isn't updated (after a manual refresh of the page, the new element shows up).

I know the control is declared just fine, because if I just comment out the first userControl markup, the other one works without problems.

I'm setting the ValidationGroup for the detailsView dinamically to avoid problems in that sense, but that doesn't change anything.

Might I be missing something obvious?, I could post the code but it is a lot, so I thought that I might ask for some advice before trying that.

Thanks