Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

How to sort gridview

Avatar of mgmhicks
mgmhicks asked on
Visual Basic Classic.NET ProgrammingASP.NET
17 Comments1 Solution1470 ViewsLast Modified:
I am using the following code to try and sort a gridview.  I have a column that has a sort expression of name (the field Name) and the grid is enabled for paging and sorting.  When I run the following code it ends up in a loop and I cant figure out why.  It then crashes.  Where have I missed the boat.






Protected Sub SelectionGrid_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs)
        If e.SortDirection = SortDirection.Ascending Then
                      
            SelectionGrid.Sort(e.SortExpression, SortDirection.Descending)
        Else
            SelectionGrid.Sort(e.SortExpression, SortDirection.Ascending)
        End If
    End Sub
ASKER CERTIFIED SOLUTION
Avatar of gadavis2
gadavis2

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 17 Comments.
See Answers