?
Solved

flexgrid scroll problem

Posted on 2003-02-24
12
Medium Priority
?
643 Views
Last Modified: 2007-12-19
hello! i have a problem with flexgrid i`am using 3 flexgrids i dont see a scroll in the second
i changed scroll bars = both in 3 of them
i`am using those functions

Public Sub SetGridBySql(strSql As String, dsnName As String, Grid As MSFlexGrid, arrWidth() As Integer, align As Integer)

Dim conn As New Connection
Dim rs As New Recordset
Dim i As Integer
Dim row As Integer
   
 
    conn.Open "dsn=" & dsnName
   
    rs.Open strSql, conn, adOpenStatic
   
    Grid.Rows = rs.RecordCount + 1
 
    Grid.Cols = rs.Fields.Count
   
   
    For i = 0 To rs.Fields.Count - 1
        Call SetCell(Grid, 0, i, rs.Fields(i).Name, align)
        Grid.ColWidth(i) = arrWidth(i)
    Next
   
    row = 1
    Do Until rs.EOF
        For i = 0 To rs.Fields.Count - 1
            Call SetCell(Grid, row, i, rs.Fields(i), align)
        Next
        row = row + 1
        rs.MoveNext
    Loop
   
    rs.Close
    conn.Close
   
End Sub


Public Sub SetCell(Grid As MSFlexGrid, row As Integer, col As Integer, val As String, align As Integer)
    Grid.row = row
    Grid.col = col
    Grid.Text = val
    Grid.CellAlignment = align
End Sub
0
Comment
Question by:b555
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +3
12 Comments
 
LVL 18

Expert Comment

by:Sethi
ID: 8012948
Even if you set the scroolbars to Both, the scrollbars will only appear when the columns or rows cross the client area of the flexgrid. If the rows and columns are within the client area the scrollbars wont appear. To get the scrollbars just add a few extra enteries to the flexgrid and see the scrollbar appear.
0
 

Author Comment

by:b555
ID: 8015572
i have scroll bars only in the first flex grid
i`am using the first flex to get data to the second flex
in the second flex there is a data that you cant see
because you dont have the scrollbars at all

0
 
LVL 18

Expert Comment

by:Sethi
ID: 8015814
Set the property value of "Scrollbars" to Both in the design time.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:b555
ID: 8016677
i tried Gridanswer.ScrollBars = flexScrollBarBoth

still dont work
iam getting crazy from it
plzzzz
0
 

Author Comment

by:b555
ID: 8016803
i tried Gridanswer.ScrollBars = flexScrollBarBoth

still dont work
iam getting crazy from it
plzzzz
0
 
LVL 18

Accepted Solution

by:
Sethi earned 200 total points
ID: 8016823
Also set this property at design time. It might be possible that you are setting this property in a procedure at runtime that is not at all getting fired. Or set this property at form load.
0
 

Expert Comment

by:CleanupPing
ID: 8901189
b555:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8972680
Moderator, my recommended disposition is:

    Accept Sethi's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0
 

Expert Comment

by:richardbc
ID: 12665425
Not a good answer as there is a problem with the flexgrid where sometimes it just does not display the scroll bars!!

I have 3 flex grids on tabs and when switching from one to another then sometimes there are no scroll bars, switch again and they are back.

Please NO stupid suggestions about settings being changed in the code or not enough lines filled.

Some intelligent comments would be very welcome.
0
 
LVL 1

Expert Comment

by:bluedragon99
ID: 12903877
have the same problem
0
 

Expert Comment

by:richardbc
ID: 12905118
I solved the problem by forcing the width to be less than the Tab container
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question