Skip to content

Commit df25391

Browse files
committed
address comments
1 parent 04c1d70 commit df25391

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

knowledge-base/datagrid-maui-row-column-counts.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,19 @@ I need to determine the number of rows and columns in a DataGrid.
2727

2828
To retrieve the number of rows and columns in a DataGrid for MAUI, follow the steps below:
2929

30-
**1.** Obtain the number of rows
31-
32-
The DataGrid generates rows based on the count of items in the collection bound to the `ItemsSource` property. Use the following code to get the number of rows:
30+
**1.** Obtain the number of rows. The DataGrid generates rows based on the count of items in the collection bound to the `ItemsSource` property. Use the following code to get the number of rows:
3331

3432
```csharp
3533
var rowNumber = (this.dataGrid.ItemsSource as ObservableCollection<FilesData>).Count.ToString();
3634
```
3735

38-
**2.** Obtain the number of columns
39-
40-
The DataGrid exposes a `Columns` collection. Access this collection to get the amount of columns:
36+
**2.** Obtain the number of columns. The DataGrid exposes a `Columns` collection. Access this collection to get the amount of columns:
4137

4238
```csharp
4339
var columnNumber = this.dataGrid.Columns.Count.ToString();
4440
```
4541

46-
These snippets gives the total number of rows and columns in the DataGrid.
42+
These snippets give the total number of rows and columns in the DataGrid.
4743

4844
## See Also
4945

0 commit comments

Comments
 (0)