We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How can you refresh non-adjacent columns simultaneously?

Looking for a way to refresh all the cells in two particular columns in one efficient shot, instead of making two calls to the grid. For instance, refresh 1st and 3rd column, they are non adjacent. Using the GridRangeInfo class does not seem to do it. It offers a .Union method but this would include column 2 in the range as well, which would be a waste. Is there no way of asking the grid to refresh two discontiguous columns short of making 2 seperate calls?

3 Replies

AD Administrator Syncfusion Team September 9, 2004 04:58 PM UTC

I don''t know of a way to update two non-contiguous areas in a single call. You could try calling grid.Invalidate twice for the two areas and then call grid.Update to see if this works better for you than calling grid.Refreshrange twice.


AD Administrator Syncfusion Team September 9, 2004 05:06 PM UTC

How can you tell .Invalidate() to deal with columns? It seems to deal with Regions only, how do I get a region for 2 specific columns?


AD Administrator Syncfusion Team September 9, 2004 05:58 PM UTC

Control.Invalidate takes a Rectnagle. Use grid.RangeInfoToRectangle to covert a GridRangeInfo object to a Rectangle. (You still have to call grid.Invalidate twice for the two rectangles.)

Loader.
Live Chat Icon For mobile
Up arrow icon