|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Gridview OnPageIndexChanging not firing in beta 2I recently installed the Visual Studio Beta 2 environment and now my
OnPageIndexChanging methods don't get called when a change page button is clicked on the GridView control. It worked fine in Beta 1, but now it doesn't fire. The change page buttons cause a postback, all of the controls are loaded but niether the OnPageIndexChanging or OnPagedIndexChaged events fire. If anyone has any suggestions I would greatly appretiate hearing them. Thanks Seems to work fine in my tests (though I have dummy databinding and
autogenerating of columns). Are you sure you have event handlers wired correctly? Post a sample code demonstrating the issue. -- Show quoteHide quoteTeemu Keiski ASP.NET MVP, AspInsider Finland, EU "Ohio Mike" <Ohio M***@discussions.microsoft.com> wrote in message news:BAAE7973-0B50-420D-83F9-290ED9A37EFD@microsoft.com... >I recently installed the Visual Studio Beta 2 environment and now my > OnPageIndexChanging methods don't get called when a change page button is > clicked on the GridView control. It worked fine in Beta 1, but now it > doesn't fire. The change page buttons cause a postback, all of the > controls > are loaded but niether the OnPageIndexChanging or OnPagedIndexChaged > events > fire. If anyone has any suggestions I would greatly appretiate hearing > them. > > Thanks It turns out I had a couple of problems. One was a url rewriter we were
using that needed to be fixed and the second was ViewState must now be enabled. I have noticed that the control acts differently depending on how you bind the data to the control. I'm using a dataset that contains 5 tables, so I set the datasource, datamember and call the databind method in my binddata method on the code behind page. In beta 1 if you set the datasourceid instead of the datasource, you didn't even need to create a method to handle the onpageindexchanging event. I haven't had time to play around with all of the different scenarios, but the same exact code from beta 1 no longer worked in beta 2. After the url rewriter was fixed, when I changed the enableviewstate property to true it worked fine. When I changed enableviewstate back to false, the event no longer fired. Thanks, Mike Show quoteHide quote "Teemu Keiski" wrote: > Seems to work fine in my tests (though I have dummy databinding and > autogenerating of columns). Are you sure you have event handlers wired > correctly? Post a sample code demonstrating the issue. > > -- > Teemu Keiski > ASP.NET MVP, AspInsider > Finland, EU > > > "Ohio Mike" <Ohio M***@discussions.microsoft.com> wrote in message > news:BAAE7973-0B50-420D-83F9-290ED9A37EFD@microsoft.com... > >I recently installed the Visual Studio Beta 2 environment and now my > > OnPageIndexChanging methods don't get called when a change page button is > > clicked on the GridView control. It worked fine in Beta 1, but now it > > doesn't fire. The change page buttons cause a postback, all of the > > controls > > are loaded but niether the OnPageIndexChanging or OnPagedIndexChaged > > events > > fire. If anyone has any suggestions I would greatly appretiate hearing > > them. > > > > Thanks > > >
Protected Shadows With Events.
Page.RegisterClientScriptBlock() is not working ..... :-( dynamic textbox empty string How do I access HTML controls from the code behind? e.Item.Cells.Count in UpdateCommand event of Datagrid Binding Data to IE Treeview control How to filter two combos on grid clientside How do I create an "event" to deal with textarea and DataGrid? Can a User Control display a pdf or static html file? ASP.NET Book Recommendation |
|||||||||||||||||||||||