Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Elegant Grid Tech Support » Hide Columns in ribbon grid control Collapse All
Subject Author Date
Alex Pag Nov 13, 2009 - 7:07 AM

Hi. I need show and hide some columns when programm run. This is my code...


Mobile and Store is at Columns.


Mobile.Visible = true;

Store.Visible = false;


But my grid repaint very slowly. What can i do for show and hide quickly? 


 

Alex Pag Nov 17, 2009 - 1:49 AM

i find what happend...


this is my column


 Mobile.CellStyles.AddRange(new Elegant.Ui.Grid.CellStyle[] { txtCellStyleNotEdit });
 Mobile.DataPropertyName = "Mobile";
 Mobile.HeaderText = " Mobile ";

boundGridControl1.DataSource = myTable;

if  "Mobile" column name it does not exist in myTable then the grid does not function fast when i want show or hide this column. I have resolved the problem.


 

Technical Support Nov 16, 2009 - 1:12 PM

Try to enclose your code into the BeginInit() and EndInit() methods like as follows:

boundGridControl1.BeginInit();
Mobile.Visible = false;
Store.Visible = false;
boundGridControl1.EndInit();