Syncfusion.Grid.Windows
Example 


PopulateValues Method (GridControl)

See GridModel.PopulateValues in the GridModel class for information.
Syntax
'Declaration
 
Public Sub PopulateValues( _
   ByVal range As GridRangeInfo, _
   ByVal dataSource As Object _
) 
'Usage
 
Dim instance As GridControl
Dim range As GridRangeInfo
Dim dataSource As Object
 
instance.PopulateValues(range, dataSource)
public void PopulateValues( 
   GridRangeInfo range,
   object dataSource
)

Parameters

range
dataSource
Example
This example shows how to populate the values to the grid with the specified range and datasource.
// Populating DataSource
DataTable dataTable = new DataTable("Sample");
dataTable.Columns.Add("Column 1");
dataTable.Columns.Add("Column 2");
dataTable.Columns.Add("Column 3");
dataTable.Columns.Add("Column 4");
dataTable.Rows.Add("Row1", "Row2", "Row3", "Row4");
            
Populating the values to grid.
this.gridControl1.PopulateValues(GridRangeInfo.Cells(1, 1, dataTable.Rows.Count, dataTable.Columns.Count), dataTable);
' Populating DataSource
Dim dataTable As DataTable = New DataTable("Sample")
dataTable.Columns.Add("Column 1")
dataTable.Columns.Add("Column 2")
dataTable.Columns.Add("Column 3")
dataTable.Columns.Add("Column 4")
dataTable.Rows.Add("Row1", "Row2", "Row3", "Row4")
            
'Populating the values to grid.
this.gridControl1.PopulateValues(GridRangeInfo.Cells(1, 1, dataTable.Rows.Count, dataTable.Columns.Count), dataTable)
AssemblyVersion

Syncfusion.Grid.Windows: 17.3460.0.26

See Also