Bug Report B90406
Visible to All Users

Grid doesn't display rows when a new DataSource is assigned within a BeginUpdate - EndUpdate block

created 17 years ago

Hi…
We have a problem when it comes to refresh a gridControl. In our project we have a method that assign a datatable to the gridControl dataSource, and another visual modifications. All these are between BeginUpdate and EndUpdate methods of gridControl object.
If the grid has the scroll activated and to select a row i have to scroll down in the grid and then i click in a button that create another DataTable only with the selected row and call the method described above, the grid don ́t show the selected row. Only if we click in the grid and then make a scroll with the mouse the grid is redesigned.
Steps to Reproduce:
1- Scrool down in the grid.
2- select a row
3- click in the button above the grid
- to show the record:
    4- click in the grid
    5- scroll with the mouse to the record appear

C#
<newline /> gridControl1.BeginUpdate(); <newline /> <newline /> gridControl1.DataSource = dt2; <newline /> <newline /> gridControl1.EndUpdate(); <newline />

Expected Results:
Only the 3 first steps should be made to show the record. We could have significant performances problems if we move grid datasource assign out of BeginUpdate and EndUpdate method.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.