in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

DataSource Clearing and Flexgrid

Last post 03-04-2008 11:34 AM by greggw. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-03-2008 9:10 PM

    DataSource Clearing and Flexgrid

    I have a flexgrid that is bound to a datasource ( a simple DataTable ). Its being used in a real time logging system so new rows are being added at around 100ms. I would like the users to be able to move the columns around at will as well as resize the columns at will.

     The users can start and stop logging as well as clear the contents of the datasource. The problem is with this 'clearing' feature. Whenever the datatable is cleared, the flexgrid resets all the widths to to Default (-1) and relocates the columns to their original ordinals ( being in the order of the datatable columns ).

    My question is this. Can the flexgrid remember its own ordinals and widths as set by the user, irrelevant of the datatable? Setting the AutoSize property to false does not fix it either. The DataTable by design, has no reference to a width field.

  • 03-04-2008 9:51 AM In reply to

    Re: DataSource Clearing and Flexgrid

    Are u using .Net 2.0 with SP1 installed? If yes.. its the problem of Grid. Because with SP1 installed when a datasource is modified. Grids onSelChange events and the events for Drawing gets fired. Since your datasource is not yet finsihed building up, these event will not get latest copy of datasource and they will resize to minimum size.
  • 03-04-2008 11:34 AM In reply to

    • greggw
    • Top 25 Contributor
    • Joined on 02-09-2006
    • Corona, CA
    • Posts 154

    Re: DataSource Clearing and Flexgrid

    > Can the flexgrid remember its own ordinals and widths as set by the user, irrelevant of the datatable?
    > Setting the AutoSize property to false does not fix it either.
     
    AutoGenerateColumns = false
     
    and...
     
    Set you column layout before assigning your DataSource.
     
    HTH
    --
    Gregg Walker
Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.