CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 1999
    Posts
    91

    Question Width of cell not changed in mouseupevent of datagrid when resizing??

    Hi,

    When resizing a column in a datagrid, the expected value of the width of that column can not be retrieved in the mouseup event. It has the same value when the resizing started.

    The size is retrieved by:
    dgdSettings.GetCellBounds(dgdSettings.CurrentCell.RowNumber, dgdSettings.CurrentCell.ColumnNumber)

    How is that possible and how to get the correct widht of that column.
    :

  2. #2
    Join Date
    Jun 2003
    Location
    Malaysia (P.J)
    Posts
    410

    Smile

    ur code works fine.

    The reason u get the same value is because u straight when and resize the column without clicking the cell. U gotta click the cell b4 clicking resizing the column
    Back after a long hibernation.

  3. #3
    Join Date
    Aug 1999
    Posts
    91
    But a user is expecting something else.
    When a user resizes a column, you can not expect him to click on the cell.

    I need this because I have a button places in a cell, and I want to relocate it after resizing the column.

    Any other suggestions?

  4. #4
    Join Date
    Jun 2003
    Location
    Malaysia (P.J)
    Posts
    410
    Well I was just answering ur question, not giving u an implementation guide to ur users

    My suggestion will be autoresizing the column to fit the text. Is that what u also wanted?
    Back after a long hibernation.

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

Featured