回复 4楼wanghaibo的帖子
可以直接设置选择区域的属性,请使用以下代码设置:
- public Form1()
- {
- InitializeComponent();
- this.fpSpread1.SelectionChanged+=fpSpread1_SelectionChanged;
- }
- private void fpSpread1_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
- {
- this.propertyGrid1.SelectedObject = this.fpSpread1.ActiveSheet.Cells[e.Range.Row, e.Range.Column, e.Range.Row + e.Range.RowCount-1, e.Range.Column + e.Range.ColumnCount-1];
- }
复制代码 |