Skip to content

Commit 1443b7f

Browse files
ES-975464 - Added the images
1 parent 21479b7 commit 1443b7f

7 files changed

+24
-3
lines changed

AfterExtendingCoveredRange.png

21.9 KB
Loading

AfterRemovingCoveredRange.png

22 KB
Loading

BeforeExtendingCoveredRange.png

20.4 KB
Loading

BeforeRemovingCoveredRange.png

20 KB
Loading
9.9 KB
Loading

FindingCellinCoveredRange.png

18.1 KB
Loading

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# WPF GridControl coveredcells
1+
# WPF GridControl CoveredCells
22

3-
This repository contains the samples that demonstrates various options in covered cell feature of [WPF GridControl](https://help.syncfusion.com/wpf/gridcontrol/overview).
3+
This repository contains the samples that demonstrates various options in covered cell feature of [WPF GridControl](https://www.syncfusion.com/wpf-controls/excel-like-grid).
44

55
### Creating covered cells using QueryCoveredRange event
66

@@ -24,6 +24,8 @@ private void Grid_QueryCoveredRange(object sender, Syncfusion.Windows.Controls.G
2424
}
2525
```
2626

27+
![GridControl with covered cells applied using QueryCoveredRange event](CoveredCellsUsingQueryCoveredRange.png)
28+
2729
### Find whether a cell in covered range
2830

2931
When you want to find a cell in covered ranges, you can use the [GetCoveredCell](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridCoveredCellInfoCollection.html#Syncfusion_Windows_Controls_Grid_GridCoveredCellInfoCollection_GetCoveredCell_System_Int32_System_Int32_) method. If the specified cell with row index and column index is inside in `GetCoveredCell`, a range will be returned.
@@ -37,6 +39,8 @@ CoveredCellInfo coverRanges = grid.Model.CoveredRanges.GetCoveredCell(2, 3);
3739
MessageBox.Show("Cover range for cell (2,3) is " + "R" + coverRanges.Left + "C" + coverRanges.Top + ":" + "R" + coverRanges.Bottom + "C" + coverRanges.Right);
3840
```
3941

42+
![Image showing cell which is in covered range](FindingCellinCoveredRange.png)
43+
4044
### Remove covered range at run time
4145

4246
You can remove the covered range at run time by using [Clear](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.CellSpanInfoCollection-1.html#Syncfusion_UI_Xaml_CellGrid_CellSpanInfoCollection_1_Clear) method.
@@ -65,17 +69,34 @@ private void Button_Click(object sender, RoutedEventArgs e)
6569
grid.InvalidateCells();
6670
}
6771
```
72+
The below image provides covered range at run time before removing
73+
74+
![Gridcontrol before removing the covered range](BeforeRemovingCoveredRange.png)
75+
76+
The below image provides covered range at run time after removing
77+
78+
![Gridcontrol after removing the covered range](AfterRemovingCoveredRange.png)
6879

6980
### Extend covered range at run time
7081

7182
You can extend the covered range at run time by using [Add](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.CellGrid.CellSpanInfoCollection-1.html#Syncfusion_UI_Xaml_CellGrid_CellSpanInfoCollection_1_Add__0_) method.
7283

7384
For example, Create one button. Next, clear the current covered cell collection using `Clear` method and create new covered cell ranges by using `Add` method in this click event.
7485

86+
**Note:** Before extend the covered cell range, you need to clear the covered range.
87+
7588
``` csharp
7689
//Remove the current covered cell range
7790
grid.Model.CoveredRanges.Clear();
7891
grid.InvalidateCells();
7992
//Add new covered cell range
8093
grid.Model.CoveredRanges.Add(new CoveredCellInfo(2, 2, 7, 7));
81-
```
94+
```
95+
96+
The below image provides covered range at run time before extending.
97+
98+
![Gridcontrol with covered range before extending](BeforeExtendingCoveredRange.png)
99+
100+
The below image provides covered range at run time after extending.
101+
102+
![Gridcontrol with convered range after extending](AfterExtendingCoveredRange.png)

0 commit comments

Comments
 (0)