Results 1 to 4 of 4

Thread: I love DataGrids

  1. #1

    Thread Starter
    Lively Member xhomerx's Avatar
    Join Date
    Feb 2001
    Posts
    98

    I love DataGrids

    First off, is there any tutorials on the web concering the DataGrid in VB6?

    My problem:

    I have a datagrid which is populated by a record set - If there are a lot of records it expands past my form and i cant get to the bottom of the records. There is a scrollbar to the right, but it only shows the top arrow and not the bottom one. Is there a way to force the datagrid to not expand?

    Any help or suggestions would be appreciated....

  2. #2
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    You have probably been here, but about the only decent information on the web that I can find is at msdn. http://msdn.microsoft.com/library/de...ridcontrol.htm

    For me, the dataGrid has been one of those controls that you learn about by trial and error. Not much information in any of the VB books that I have.

    I have never had a datagrid expand any larger than the original size of the object I placed on the form, no matter how many records were in the recordSet. I could not find any parameter that would cause that to happen.

  3. #3

    Thread Starter
    Lively Member xhomerx's Avatar
    Join Date
    Feb 2001
    Posts
    98
    Thanx for the link - I had not been there before...Yet again I solved my problem - I had the following code in my program:

    Private Sub Form_Resize()
    DataGrid1.Left = 0
    'DataGrid1.Top = 2280
    DataGrid1.Width = Me.ScaleWidth
    DataGrid1.Height = Me.ScaleHeight - (Text1.Height + 25)
    End Sub

    I took it out and the problem went away - your post helped me because i am new to using this crazy datagrid control and am not sure what is normal behavior for it....

  4. #4
    Fanatic Member
    Join Date
    Aug 2000
    Posts
    736
    That would do it. I didn't think there was a parameter that would make a dataGrid resize like you described. Thanks for posting the solution to your question.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width