Results 1 to 2 of 2

Thread: Strange Refresh Bug...

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Location
    New York
    Posts
    29

    Question Strange Refresh Bug...

    Hi, I experience a strange refresh bug in my program. I have a sublassed DataGrid that has a TableStyle attached to it. At initialization time I set the PreffereRowHeight to 30. Then, at runtime I have a button that when pressed changes the value to 60. The code looks like this:

    dg.TableStyle(0).PrefferedRowHeight = 60
    dg.Refresh()

    After this I even have a MsgBox that displays the value to be sure it was set. However the view doesn't refresh with the new row height UNLESS I press one of the column headers (that makes a quick sort on that column). Once I press the column the row height miraculously jumps to 60...

    My question: what kind of refresh is the sort action performing that my code doesn't perform?

    thank you,
    iulian

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Nov 2002
    Location
    New York
    Posts
    29
    This is the most annoying and frustrating thing I have ever experienced... Look:

    dg.TableStyles(0).PreferredRowHeight = 50
    dg.TableStyles(0).DataGrid.PreferredRowHeight = 50
    dg.TableStyles(0).DataGrid.Refresh()
    dg.Update()
    dg.Refresh()
    dg.Invalidate()
    dg.Invalidate(New Region(New Rectangle(Me.Location.X, Me.Location.Y, Me.Size.Width, Me.Size.Height)))

    The datagrid just WON'T update with the new row height...
    But once I hit any column header it does update!!

    Whhhhhhhhhhhhhyy?? Whhhhhhhhhhhhyy?

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