or
Hi,
I have setup a dataSet with 3 tables Locations,Customers and Orders. I have setup 3 relations "Locations to Customers" , "Locations to Orders" and "Customers to Orders"
I have a form that has two GridViews one to show All the Customers and one to show the Selected Customers Orders.
I have done this by:
MainForm.DataSource = FormData;MainForm.DataMember = "Customers";SubForm.DataSource = FormData;SubForm.DataMember = "Customers.Customers_Orders";
private void BindLangDataToTree(){ this.radTreeView1.DisplayMember = "Thema_" + myLang; ; this.radTreeView1.ParentMember = "pid"; this.radTreeView1.ChildMember = "id"; this.radTreeView1.ValueMember = "id"; radTreeView1.DataSource = ds_Baum.Tables["Baum"];//.Select("Schule='" + mySchuleID + "'");}public partial class RadGridViewDialog : Form{ private RadGridView _grid; public RadGridViewDialog() { InitializeComponent(); } private void btnInitialize_Click(object sender, EventArgs e) { _grid = new RadGridView(); panel2.Controls.Add(_grid); _grid.Dock = DockStyle.Fill; _grid.BringToFront(); } private void btnBuild_Click(object sender, EventArgs e) { using (_grid.DeferRefresh()) { GridViewDataColumn firstColumn = new GridViewTextBoxColumn(); firstColumn.HeaderText = "Name"; _grid.Columns.Add(firstColumn); firstColumn.ReadOnly = true; GridViewDataRowInfo[] rows = new GridViewDataRowInfo[200]; GridViewDataColumn secondColumn = new GridViewTextBoxColumn(); secondColumn.HeaderText = "Value"; _grid.Columns.Add(secondColumn); secondColumn.Width = 110; secondColumn.MinWidth = 70; int rowIndex = 0; for (int i = 0; i < rows.Length; i++) { rows[rowIndex] = new GridViewDataRowInfo(_grid.MasterView); rows[rowIndex].Cells[0].Value = "name" + i; rows[rowIndex].Cells[1].Value = "value" + i; rowIndex++; } firstColumn.IsPinned = true; _grid.Rows.AddRange(rows); firstColumn.BestFit(); } }}