Hi All.
I found interesting code to use DataGridView in WPF.
XAMLVB codeCode:<Window x:Class="Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:WinForms="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms" Title="Window2" Height="300" Width="300"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*"></RowDefinition> </Grid.RowDefinitions> <WindowsFormsHost Grid.Row="0"> <WinForms:DataGridView x:Name="myDG"> </WinForms:DataGridView> </WindowsFormsHost> </Grid> </Window>How to modify this code using DataSet and TableAdapter?Code:Imports System.Windows.Data Imports System.Windows.Forms.Integration Imports System.Data Partial Public Class Window1 Public Sub New() InitializeComponent() Dim dt As New DataTable() dt.Columns.Add("Col1", GetType(String)) dt.Columns.Add("Col2", GetType(String)) dt.Rows.Add("Hello", "World") dt.Rows.Add("Green", "Apple") dt.Rows.Add("Big", "Orange") dt.Rows.Add("Fresh", "Water") myDG.DataSource = dt End Sub End Class
Thanks.


