Skip to content

Commit 7c61689

Browse files
ES-975464 - Addressed the concerns
1 parent 98ebead commit 7c61689

File tree

3 files changed

+48
-8
lines changed

3 files changed

+48
-8
lines changed

GridControlImage.png

58.2 KB
Loading

InstallingNuGetPackage.png

759 KB
Loading

README.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,35 @@
1-
# How to create grid control in vb net
1+
# How to Create WPF GridControl in VB.NET?
22

3-
This example demonstrates how to create grid control application in vb.net.
3+
This example demonstrates how to create application with [WPF GridControl](https://www.syncfusion.com/wpf-controls/excel-like-grid) in vb.net.
4+
5+
The GridControl is a cell-oriented control for displaying tabular data. It does not make any assumptions regarding the structure of the data. Users can customize it down to the cell level and can use a grid virtually where the data is provided on demand in real-time. If you are searching for Grid capable of binding different types of data sources and handling data (sorting, filtering, etc.), please refer to the [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid) (SfDataGrid) control.
46

57
### Creating Grid Control in VB.Net
6-
1. Create a new VB.Net WPF application project
7-
2. Install the [Syncfusion.Grid.WPF](https://www.nuget.org/packages/Syncfusion.Grid.WPF) NuGet package as a reference to your .NET Framework applications from NuGet.org.
8+
9+
1. Create a new VB.Net WPF application project.
10+
11+
2. Install the [Syncfusion.Grid.WPF](https://www.nuget.org/packages/Syncfusion.Grid.WPF) NuGet package as a reference to your .NET Framework applications from NuGet.org.
12+
13+
![Install Syncfusion.Grid.WPF from the NuGet package manager](InstallingNuGetPackage.png)
14+
815
3. Add the following Syncfusion namespace in MainWindow.xaml to make use of the GridControl
9-
4. Add the GridControl inside the `ScrollViewer` control which provides scrollable area to other visible elements that it contains.
1016

11-
#### XAML
17+
``` xml
18+
<Window x:Class="MainWindow"
19+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
20+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
21+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
22+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
23+
xmlns:local="clr-namespace:GridControlDemo"
24+
mc:Ignorable="d"
25+
xmlns:Syncfusion="clr-namespace:Syncfusion.Windows.Controls.Grid;assembly=Syncfusion.Grid.WPF"
26+
Title="MainWindow" Height="450" Width="800">
27+
<Grid>
28+
</Grid>
29+
</Window>
30+
```
31+
32+
4. Add the GridControl inside the `ScrollViewer` control which provides scrollable area to other visible elements that it contains.
1233

1334
``` xml
1435
<Window x:Class="MainWindow"
@@ -40,9 +61,10 @@ gridControl.Model.ColumnCount = 10
4061

4162
### Populating Data
4263

43-
Data can be populated in grid control using one of the following methods.
64+
Data can be populated in GridControl using one of the following methods.
4465

4566
1. Populate data by looping through the cells in Grid
67+
4668
``` vb
4769
'Specifying row and column count
4870
gridControl.Model.RowCount = 50
@@ -79,4 +101,22 @@ Private Sub grid_QueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellI
79101
e.Style.CellValue = rand.Next(10, 100)
80102
End If
81103
End Sub
82-
```
104+
```
105+
106+
![Image showing GridControl](GridControlImage.png)
107+
108+
### Editing
109+
110+
GridControl has the default support for editing the cells. Editing can be customized for each cell using various events like `CurentCellStartEditing`, `CurrentCellActivating` and `CurrentCellChanging`, etc. Also, GridControl support various built-in editors such as `DoubleEdit`, `PercentEdit`, `IntegerEdit`, `MaskEdit`, `RichText`, `UpDownEdit`, `CurrencyEdit` and `DateTimeEdit` which can be configured for each cell in GridControl.
111+
112+
### Formulas
113+
114+
GridControl supports Excel-like formulas in each cell and allows to enter algebraic expressions using formulas and cell references by setting the cell type of a cell to `FormulaCell`. The control comes with an extensive formula function library that supports more than 150 built-in formulas.
115+
116+
### Excel-like features
117+
118+
GridControl has the built-in supports to change the appearance like Microsoft Excel current cell, selection and selection frame by using [ExcelLikeCurrentCell](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridModelOptions.html#Syncfusion_Windows_Controls_Grid_GridModelOptions_ExcelLikeCurrentCell), [ExcelLikeSelection](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridModelOptions.html#Syncfusion_Windows_Controls_Grid_GridModelOptions_ExcelLikeSelection) and [ExcelLikeSelectionFrame](https://help.syncfusion.com/cr/wpf/Syncfusion.Windows.Controls.Grid.GridModelOptions.html#Syncfusion_Windows_Controls_Grid_GridModelOptions_ExcelLikeSelectionFrame) properties respectively.
119+
120+
### Summary
121+
122+
GridControl has the support for various cell types, exporting options, support for serialization, printing support and support to customize the appearance, etc. For more information on the GridControl and its features, please see our [User Guide Documentation](https://help.syncfusion.com/wpf/gridcontrol/overview). You can also refer to the [Feature Tour](https://www.syncfusion.com/wpf-controls/excel-like-grid) site to get an overview on all the features in grid. Refer this [documentation](https://help.syncfusion.com/wpf/control-dependencies#grid-control) to know about the required assemblies for creating GridControl.

0 commit comments

Comments
 (0)