Component Designs Support Forums
CDI Support Forums

Forums | Login | Join | My Profile | Inbox | Address Book | My Subscription  
My Forums | Member List | Search | Contact Admin | Log Out  

Refreshing column headings at runtime

 
Logged in as: Guest
  Printable Version
All Forums >> [Components] >> ezGrid .NET >> Refreshing column headings at runtime Page: [1]
Login
Message << Older Topic   Newer Topic >>
Refreshing column headings at runtime - 7/11/2006 7:15:55 PM   
Maxx

 

Posts: 287
Joined: 3/22/2004
Status: offline
Changing text of a column heading does not notify the grid the column headings need to be refreshed at runtime.

To get around this we have implemented a BeginBatch/EndBatch command. Any code wrapped inside a begin/end batch method will not cause any painting to occur until the EndBatch method is called.

The BeginBatch and EndBatch methods have been part of ezGrid since version 2.0 but have now been further optimized and as of v2.0.12 will correctly render column headings if they have changed.

To change column headings during run time you will need to do something similar to the following.

C#
gridControl1.BeginBatch();
gridControl1.Columns[1].ColumnHeader.Text = "Hello";
gridControl1.EndBatch();

VB.NET
GridControl1.BeginBatch()
GridControl1.Columns(1).ColumnHeader.Text = "Hello"
GridControl1.EndBatch()




_____________________________

Director of CDI Support
Post #: 1
Page:   [1]
All Forums >> [Components] >> ezGrid .NET >> Refreshing column headings at runtime Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


© Copyright Component Designs, Inc. 2001-2005. All rights reserved.

0.031