The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator 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
CMCharlie MaoNovember 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
ADAdministrator 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.