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

Issues with DrawClippedGrid aproach (3.3.0.0)

1. In case I re-use the graphics context in the method that calls DrawClippedGrid - the grid updated cells paint without border. 2. In case I create new graphics context in the method that calls DrawClippedGrid - the grid updated cells seem to flicker but everything paints. 3. In the Trader Grid Sample Cell values paint over existing values without clearing it.

3 Replies

MI Mike November 4, 2005 03:59 PM UTC

The #3 is caused by adding the DrawCellDisplayText event handler. >1. In case I re-use the graphics context in the method that calls DrawClippedGrid - the grid updated cells paint without border. > >2. In case I create new graphics context in the method that calls DrawClippedGrid - the grid updated cells seem to flicker but everything paints. > >3. In the Trader Grid Sample Cell values paint over existing values without clearing it. >


AD Administrator Syncfusion Team November 7, 2005 07:19 AM UTC

Hi, 1. I couldn''t see the problem with borders not being painted. Did you see that problem with the TraderGridTest example? In your code is the area for the borders included in the rectangle you specify? If you upload a sample demonstrating the problem I can look into it (also for #3 ...). 2. If you experience flickering one way to avoid this is to use DrawClippedGrid to draw to a bitmap and then draw this bitmap to the graphics context. I can try to create a sample for this but I would rather like to first check out what the reason is behind the other two problems you have. 3. I can''t see that in TraderGridTest example in 3.3.0.0 even with DrawCellDisplayText enabled. What are the exact settings you used to provoke that problem? Did you override methods that handle drawing of the background of cells? Stefan >The #3 is caused by adding the DrawCellDisplayText event handler. > >>1. In case I re-use the graphics context in the method that calls DrawClippedGrid - the grid updated cells paint without border. >> >>2. In case I create new graphics context in the method that calls DrawClippedGrid - the grid updated cells seem to flicker but everything paints. >> >>3. In the Trader Grid Sample Cell values paint over existing values without clearing it. >>


MI Mike November 7, 2005 05:16 PM UTC

2. Grid performance has been a major concern and focus in my app. Specifically, I have a grid with 40 x 25 visible rows and cols. This view is updating 40% of cells every half a second, and all updated cells fade two times every five seconds after the initial update. While using Performance Grid from 2.9.0.1 my CPU peaks 60-70%. If I just return a test value and no style from QueryCellInfo for a cell - CPU stays almost as high. One issue with InvalidateRange is when I have many random ranges – the actual panting region is unnecessarily large. But using RefreshRange brings CPU even higher. If I just override OnPaint in the PerformanceGrid to paint a random color background – CPU stays very low. Running TraderGridSample FROM 3.3 with inserting/removing rows off peaks my CPU to 50%. 1. I do not see the missing border problem in the TraderGridSample. I cannot recreate it myself - I have been trying to get the best performance out of the grid. When I re-create it - I''ll create another post. Let''s ignore it for now. 3. I see the cell values are being overpainted in the TraderGridSample. I also had this problem at some point, but cannot re-create it now. >Hi, > >1. I couldn''t see the problem with borders not being painted. Did you see that problem with the TraderGridTest example? > >In your code is the area for the borders included in the rectangle you specify? > >If you upload a sample demonstrating the problem I can look into it (also for #3 ...). > >2. If you experience flickering one way to avoid this is to use DrawClippedGrid to draw to a bitmap and then draw this bitmap to the graphics context. I can try to create a sample for this but I would rather like to first check out what the reason is behind the other two problems you have. > >3. I can''t see that in TraderGridTest example in 3.3.0.0 even with DrawCellDisplayText enabled. What are the exact settings you used to provoke that problem? Did you override methods that handle drawing of the background of cells? > >Stefan > >>The #3 is caused by adding the DrawCellDisplayText event handler. >> >>>1. In case I re-use the graphics context in the method that calls DrawClippedGrid - the grid updated cells paint without border. >>> >>>2. In case I create new graphics context in the method that calls DrawClippedGrid - the grid updated cells seem to flicker but everything paints. >>> >>>3. In the Trader Grid Sample Cell values paint over existing values without clearing it. >>>

Loader.
Live Chat Icon For mobile
Up arrow icon