Results 1 to 6 of 6

Thread: Subclassing MSHFlexGrid control to show alternate colors

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Posts
    74

    Subclassing MSHFlexGrid control to show alternate colors

    Hi,

    Have anyone tried subclassing MSHFlexGrid control. I want to subclass it to show alternate backcolor in rows. I can do it by looping through rows but it is creating problem when there are large number of rows.

    I also want to show row number in first column of the grid by deafult when row gets actually added/ created.



    ~Sanjivani

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Subclassing MSHFlexGrid control to show alternate colors

    What sort of problem do you encounter when having large number of rows?
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Subclassing MSHFlexGrid control to show alternate colors

    Quote Originally Posted by sanjivani
    Hi,
    ... I can do it by looping through rows but it is creating problem when there are large number of rows.
    ~Sanjivani
    What kind of problems? I'm doing that with 15000 rows. You just have to paint 1 time when its populated, after that, just the last selected row must be repainted.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2005
    Posts
    74

    Re: Subclassing MSHFlexGrid control to show alternate colors

    It is too slow for large number of rows. It is visible to user when alternate coloring of grid goes on.


    ~Sanjivani

  5. #5
    PowerPoster jcis's Avatar
    Join Date
    Jan 2003
    Location
    Argentina
    Posts
    4,430

    Re: Subclassing MSHFlexGrid control to show alternate colors

    Quote Originally Posted by sanjivani
    It is too slow for large number of rows. It is visible to user when alternate coloring of grid goes on.
    ~Sanjivani
    Could you post the code you are using?

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Subclassing MSHFlexGrid control to show alternate colors

    It is too slow for large number of rows. It is visible to user when alternate coloring of grid goes on.
    Set the Redraw property to False before the "alternate coloring" code is executed. Set it back to True when done. You should see a significant performance gain.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width