回复 3楼p332718873的帖子
参考代码如下:
- public MainPage()
- {
- InitializeComponent();
- this.gcSpreadSheet1.Sheets[0].RowCount = 10;
- this.gcSpreadSheet1.Sheets[0].ColumnCount = 10;
- }
- private void gcSpreadSheet1_TopRowChanged(object sender, GrapeCity.Windows.SpreadSheet.UI.ViewportEventArgs e)
- {
- if (true)
- {
- int rowCount = this.gcSpreadSheet1.Sheets[0].RowCount;
- this.gcSpreadSheet1.ShowRow(0, rowCount - 1, GrapeCity.Windows.SpreadSheet.UI.VerticalPosition.Bottom);
- }
- }
- private void gcSpreadSheet1_LeftColumnChanged(object sender, GrapeCity.Windows.SpreadSheet.UI.ViewportEventArgs e)
- {
- if (true)
- {
- int colCount = this.gcSpreadSheet1.Sheets[0].ColumnCount;
- this.gcSpreadSheet1.ShowColumn(0, colCount - 1, GrapeCity.Windows.SpreadSheet.UI.HorizontalPosition.Right);
- }
- }
复制代码
可以适当修改判断条件及方法参数以实现效果。
如果有其他问题,请继续和我沟通。 |