'Declaration Public Shadows Property Source As Object
'Usage Dim instance As DataGridCollectionViewSourceBase Dim value As Object instance.Source = value value = instance.Source
public new object Source {get; set;}
'Declaration Public Shadows Property Source As Object
'Usage Dim instance As DataGridCollectionViewSourceBase Dim value As Object instance.Source = value value = instance.Source
public new object Source {get; set;}
Imports System.Data.OleDb Imports System.Data Shared Sub New() Dim dataSet As New DataSet() Dim mdbfile As String = "Data\Northwind.mdb" Dim connString As String = String.Format("Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}", mdbfile) Dim conn As New OleDbConnection(connString) Dim adapter As New OleDbDataAdapter() adapter.SelectCommand = New OleDbCommand("SELECT * FROM Orders;", conn) adapter.Fill(dataSet, "Orders") m_orders = dataSet.Tables("Orders") End Sub Public Shared Readonly Property Orders() As DataTable Get Return m_orders End Get End Property Private Shared m_orders As DataTable
using System.Data.OleDb; using System.Data; Static App() { DataSet dataSet = New DataSet(); string mdbFile = @"Data\Northwind.mdb"; string connString = String.Format( "Provider=Microsoft.Jet.OLEDB.4.0; Data Source={0}", mdbFile ); OleDbConnection conn = New OleDbConnection( connString ); OleDbDataAdapter adapter = New OleDbDataAdapter(); adapter.SelectCommand = New OleDbCommand( "SELECT * FROM Orders;", conn ); adapter.Fill( dataSet, "Orders" ); m_orders = dataSet.Tables[ "Orders" ]; } public static DataTable Orders { get { return m_orders; } } private static DataTable m_orders;
<Grid xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"> <Grid.Resources> <xcdg:DataGridCollectionViewSource x:Key="cvs_orders" Source="{Binding Source={x:Static Application.Current}, Path=Orders}"/> </Grid.Resources> <xcdg:DataGridControl x:Name="OrdersGrid" ItemsSource="{Binding Source={StaticResource cvs_orders}}"/> </Grid>
Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2