are you using some sort of case statement to sort the fields?
I use a case that's calls each subrountine for the filed I want to sort.
See example. I using VB but, the concept is the same

  Protected Sub gvUsers_Sorting(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewSortEventArgs) Handles
gvUsers.Sorting
        Select Case UCase(e.SortExpression)
            Case "DEPARTMENT"
                Sort_Users_Department()
            Case "USERNAME"
                Sort_Users_Username()
                   End Select

        Me.gvUsers.PageIndex = 0
        Me.gvUsers.DataBind()
    End Sub

 Private Sub Sort_Users_Department()
        Dim dt As New DataTable
        dt = ViewState("Users_DT")

        Dim dv As DataView = dt.DefaultView

        If ViewState("Click_UsersGV") Then
            dv.Sort = "department" & " desc"
            ViewState("Click_UsersGV") = False
        Else
            dv.Sort = "department" & " asc"
            ViewState("Click_UsersGV") = True
        End If

        Me.gvUsers.DataSource = dv
    End Sub



On Mon, Jun 8, 2009 at 9:02 AM, BlueVista<[email protected]> wrote:
>
> I see child data in the child gridview.
>



-- 
Keidrick Pettaway

http://kpettaway.com

Reply via email to