|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid sorting does not workPrivate Sub dgrItems_SortCommand(ByVal source As Object, _ ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles dgrItems.SortCommand processSortIt(e.SortExpression) End Sub I also have an Private Sub dgrItems_ItemCommand event handler on this web page. When I click on one of the links in the header that should fire the SortCommand event, the ItemCommand fires instead. Anyone know a way to get around this? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! It's true that ItemCommand fires first then SortCommand
fires. In ItemCommand event, you can If e.CommandName.Equals("Sort") Then Return; ' bypass the event End If HTH Elton Wang elton_hotmail.com Show quoteHide quote >-----Original Message----- handler on this> > >I have added sorting to my datagrid. I added the event handler > > Private Sub dgrItems_SortCommand(ByVal source As Object, _ > ByVal e As >System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles >dgrItems.SortCommand > processSortIt(e.SortExpression) > End Sub > >I also have an Private Sub dgrItems_ItemCommand event >web page. should fire the> >When I click on one of the links in the header that Show quoteHide quote >SortCommand event, the ItemCommand fires instead. > >Anyone know a way to get around this? > > >*** Sent via Developersdex http://www.developersdex.com *** >Don't just participate in USENET...get rewarded for it! >. > Thanks. This was a simple solution.
Veeves *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
|||||||||||||||||||||||