Hi,
I was wondering if someone has a code snippet that allows you to reset the column and row size back to default after the user clicks and make changes to the size. TO be more clear, lets say the user resizes some columns and rows and decides to reset the changes, they can just click on a button. I am using a databoundgrid. Thanks.
Charlie
AD
Administrator
Syncfusion Team
November 10, 2006 06:28 AM UTC
Hi Charlie,
Use the ResetSize method to reset the column/row size to defaultsize. Below is a code snippet
//Reset the Column index..
this.gridControl1.ColWidths.ResetSize(ColIndex);
//Reset the Row index..
this.gridControl1.RowHeights.ResetSize(RowIndex);
//After calling the ResetSize method, you should call the Refresh or Invalidate to repaint the grid.
this.gridControl1.Refresh();
Best Regards,
Haneef
CM
Charlie Mao
November 10, 2006 07:54 PM UTC
this is for a grid control right? is there a way to do it with a databound grid. Also maybe an example project would be helpful, if its not too much to ask. thank you so much.
charlie
AD
Administrator
Syncfusion Team
November 13, 2006 04:56 AM UTC
Hi Charlie,
Yes. The above code snippet is for GridControl. You can access the ResetSize method from the Model.RowHeights class. Please refer to the attached sample which implements the ResetSize method and let me know if you trying something different.
Sample : http://www.syncfusion.com/Support/user/uploads/ResetSize_3dfc130b.zip
Best Regards,
Haneef