MS Data grid OLE DB - Column Alignment problem 
Author Message
 MS Data grid OLE DB - Column Alignment problem

On Changing the alignment of any column in grid It does
not change the Column header alignment, only alignment of
data in grid is changed.

Attached is the sample code to align the data in column.

Thanks
Farooq

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 03:22:53 GMT  
 
 [ 1 post ] 

 Relevant Pages 

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

2. MS Data Grid Ole DB - Vertical Scrollbar

3. MS Data Grid Ole DB - Vertical Scrollbar

4. Column Header Alignment with Data Grid?

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

6. OLE DB Data Grid and Jet 4.0

7. Pasting a column of numbers in Excel into a grid/db grid in VB

8. Pasting a column of numbers in Excel into a grid/db grid in VB

9. Data Environment: Missing MS JET OLE DB components

10. Pasting a column of numbers in Excel into a grid/db grid in VB

11. Grid Column Styles (Header Alignment)

12. column alignment when printing a grid

 

 
Powered by phpBB® Forum Software