0

I have two spgridviews on a page, in which if I sort the second grid it calls/triggers the sort event for the first grid instead of triggering it's own event. Same thing happens with other events also like RowDataBound, PageIndexChanging.

I Tried using asp.net grid and tested the scenario, this worked as expected. I also tried with sharepoint's list view web-part, this test-case passed as well.

but when I added two of my custom coded web-parts on the page one by one i.e., A and B, I noticed that if I add grid A first and then grid B, it always the triggers the events for grid A. The events for grid which was added second never gets triggered, instead it makes a call to the event for the first gridview's events and throws an error.

Can anyone help on this ?

Thanks.

  • Are you sure these two SPGridViews are bound to different event handlers? – Slaven Semper Aug 8 '17 at 10:24
  • yes, i am sure. – Vishwas Goswami Aug 8 '17 at 10:24
  • Can you post markup and code? – Slaven Semper Aug 8 '17 at 10:28
  • No, not allowed to do so due to some agreements. But both are SharePoint:SPGridView and both have an OnSorting method. IDs are different. – Vishwas Goswami Aug 8 '17 at 10:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.