MS Data Grid Ole DB - Vertical Scrollbar 
Author Message
 MS Data Grid Ole DB - Vertical Scrollbar

When we change the sort order in the grid, Scrollbar
pointer does not go to the top even for the 1st row at top
of grid.

thnaks

Private Sub DGViewSub_HeadClick(ByVal ColIndex As Integer)
On Error GoTo DGViewSub_HeadClick_Error

Dim Sortedby As String
Dim SortStr As String

Dim Col As Column

    Me.Description.Visible = False
    Curcol = ColIndex
    Sortedby = rsViewSub.Fields(Curcol).Name
    If PrevCol = Curcol Then
        If rsViewSub.Sort Like "*Desc" Then
            SortStr = Sortedby
        Else
            SortStr = Sortedby & " Desc"
        End If
    Else
        SortStr = Sortedby & " Desc"
    End If

    rsViewSub.Sort = SortStr
    PrevCol = Curcol
    Me.dgViewsub.Refresh
    Viewsub.Refresh
    HeadClicked = True

DGViewSub_HeadClick_Exit:
    Exit Sub

DGViewSub_HeadClick_Error:
    Resume DGViewSub_HeadClick_Exit
End Sub



Mon, 07 Jun 2004 04:31:18 GMT  
 MS Data Grid Ole DB - Vertical Scrollbar
Muhammad,

I have a similar problem since I switched my development
PC from NT 4 SP5 to Win2KPro SP1 with MDAC 2.6.   Have you
found a solution?  I am still search the newgroups for
info.

Thanks,
Bob

Quote:
>-----Original Message-----
>When we change the sort order in the grid, Scrollbar
>pointer does not go to the top even for the 1st row at
top
>of grid.

>thnaks

>Private Sub DGViewSub_HeadClick(ByVal ColIndex As Integer)
>On Error GoTo DGViewSub_HeadClick_Error

>Dim Sortedby As String
>Dim SortStr As String

>Dim Col As Column

>    Me.Description.Visible = False
>    Curcol = ColIndex
>    Sortedby = rsViewSub.Fields(Curcol).Name
>    If PrevCol = Curcol Then
>        If rsViewSub.Sort Like "*Desc" Then
>            SortStr = Sortedby
>        Else
>            SortStr = Sortedby & " Desc"
>        End If
>    Else
>        SortStr = Sortedby & " Desc"
>    End If

>    rsViewSub.Sort = SortStr
>    PrevCol = Curcol
>    Me.dgViewsub.Refresh
>    Viewsub.Refresh
>    HeadClicked = True

>DGViewSub_HeadClick_Exit:
>    Exit Sub

>DGViewSub_HeadClick_Error:
>    Resume DGViewSub_HeadClick_Exit
>End Sub

>.



Sat, 24 Jul 2004 23:41:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. MS Data Grid Ole DB - Vertical Scrollbar

2. MS Data grid OLE DB - Column Heading Alignment problem

3. MS Data grid OLE DB - Column Alignment problem

4. Using MS Data Shaping with OLE DB - data from more than one table in mpp file

5. OLE DB Data Grid and Jet 4.0

6. Data Environment: Missing MS JET OLE DB components

7. Sheridan DB Grid Scrollbar disappears

8. MS Grid Control in VB4.0 - problems in scrollbar

9. data grids/ms flex grids

10. fetching data using a grid vertical scroll bar

11. DB Grid to DB Grid Question!

12. True DB Grid 6.0 (OLE) in unbound mode

 

 
Powered by phpBB® Forum Software