Resize GridWeb and its Header Bar
Changing Width & Height of Aspose.Cells.GridWeb
Changing the width and height of Aspose.Cells.GridWeb control is a simple but important feature. The Aspose.Cells.GridWeb control is represented by the GridWeb class in the API. To resize the width and height of the GridWeb control, simply use its width and height properties.
The output of the code snippet that follows is shown below.
Changed width and height of the GridWeb control
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Setting the height of GridWeb control | |
GridWeb1.Height = new Unit(200, UnitType.Point); | |
// Setting the width of GridWeb control | |
GridWeb1.Width = new Unit(520, UnitType.Point); |
Changing Width & Height of Header Bar
Aspose.Cells.GridWeb control contains two header bars as follows:
- Top header bar, this header bar represents columns as A , B , C , D etc.
- Left header bar, this header bar represents rows as 1 , 2 , 3 , 4 etc.
Both of these header bars are shown below.
Header bars
Change the height of the top header bar and the width of the left header bar using the GridWeb control’s HeaderBarHeight and HeaderBarWidth properties respectively. The figure below shows the output of the code example that follows.
Changed header bar width and height
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// Setting the height of header bar | |
GridWeb1.HeaderBarHeight = new Unit(35, UnitType.Point); | |
// Setting the width of header bar | |
GridWeb1.HeaderBarWidth = new Unit(50, UnitType.Point); |