Hi,
I have a data grid that binds to a dataset. When user double click on it row, it opens a modal window which has textbox fields which allow user to update data. The textbox (custom control) and the data grid are data binded to the same DataSet and therefore both would update the same time.
I want to update the gird only if the user close the window. So I used the ultraGrid.BeginUpdate() and EndUpdate() to prevent it from refreshing.
This works fine on my Windows 64 bit machine. However when the QA test this on Win 7 32 bit, the BeignUpdate() stopped the grid(s) from redrawing itself. Here is the screenshot of what happen:
Thanks
dickysum said:Just wondering, will I get any performance gain from this?
I doubt it. Certainly nothing noticeable.
Thanks for the suggestion. I emailed to the infragistic email support and got the same suggestion... using the picturebox. The picture box to paint over the grid works a lot better than what I was expected. It sounds "hacky", but it is actually a very simple out of the box solution, which I believe it is better than most of the other complicated solution that I had tried.
Just wondering, will I get any performance gain from this?
Thanks for the suggestion. At one point my team has consider that option, but this approach seems to be too "hacky" and my team decided not to go for this approach. There should be a better alternative than using a PictureBox to overlay the grid.
dickysum said:Does UltraGrid update itself though the BindingSource object, or it update itself by looking directly on what the BindingSource.DataSource?
If the grid paints for any reason, it will read the information from the BindingSource. So if you mouse over a cell, you could run into a problem.
Maybe you can achieve what you want another way. What you could do is use the grid's DrawToBitmap method to draw the grid into a Bitmap object. Then hide the grid and show a PictureBox in it's place and assign the bitmap to the PictureBox. That way it will look like the grid is still there and not changing.
I tried using BindingSourceSuspendBinding() method before . I think it only prevent UI changes applies to the data model, but not the other way around. Does UltraGrid update itself though the BindingSource object, or it update itself by looking directly on what the BindingSource.DataSource?
Also, you are right on that fact that it is the theme I am using. Using Aero theme probably keep a "snapshot" of the underlying grid painting, so that it can generate the aero affect. I tested with "Classic" theme and got painting problem with the grid.