Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Fellow programmers - DataGridView Flickering problem...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fellow programmers - DataGridView Flickering problem...

    I have a DataGridView displaying rows of data and I'm getting a really bad flickering on every update of OnMarketData(). Essentially, everytime the rows update it flickers white for a second. Googling this prob brought up a solution like the following:

    public class CustomDG : DataGridView
    {
    public CustomDG()
    {
    this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint, true);
    this.UpdateStyles();
    }
    }

    This, however, doesn't solve it. Any help would be greatly appreciated.

    #2
    Hi funk101, unfortunately this is not supported. Hopefully a fellow programmer can help you out.

    Comment


      #3
      funk,

      I had this same problem when I used a DataGrid to create my own DOM. I finally gave up trying to use the DataGrid and manually drew my own grid on a panel. Seemed to work much better.

      Comment


        #4
        Well, I've reworked this code lot's. I needed a collection that was fast, and sortable, and needed to bind to the datagridview. I tried the BindingList<>, and bound it to the datagridview, that seems to be the problem, it's too slow when the data starts coming down the pipe. I reverted back to Dictionary<> converting to a List<> for the sort functions and then foreach()'ing and MANUALLY populating the List, (unbound) I guess, and it's working fine.
        Lesson learned -> I think BindingList and binding automatically to a datagridview in this particular situation can't cut the speed.

        According to my R&D, Dictionary is the fastest collection for whipping data around when you need <key, val>. (Correct me if I'm wrong, please anyone). I've read a lot of specs. SortedList, List, SortedDictionary, BindingList, etc.

        What I need to do next is, make this indicator show up on the main chart window. Currently it pops up a new window. So I guess I need to do something like "Form within a Form" but I can't seem to crack the code yet. Any help? I understand how to override Plot() but not grasping how to stuff a Form in Plot().
        Last edited by funk101; 04-29-2009, 10:00 AM. Reason: typo

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        80 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        66 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X