Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>With Syncfusion GridGroupingControl, <strong>UnboundFields</strong> collection will assist you to get this requirement achieved easily. The Table3 can be bounded to the grid and the fields that are required to be referred from other 2 tables can be added as UnboundFields to GridGroupingControl. The values can be populated through handling <strong>QueryValue</strong> event.</p> <pre><code>//On Load of Windows Form DataSet ds = new DataSet(); ds.Tables.AddRange(new DataTable[] { dt1, dt2, dt3 }); //dt1, dt2 and dt3 are Table1, Table2 and Table3 respectively this.gridGroupingControl1.DataSource = ds.Tables[2]; // Table3 bounded this.gridGroupingControl1.TableDescriptor.UnboundFields.Add("T1_VALUE"); // column from Table1 this.gridGroupingControl1.TableDescriptor.UnboundFields.Add("T2_VALUE"); // column from Table2 this.gridGroupingControl1.QueryValue += new Syncfusion.Grouping.FieldValueEventHandler(gridGroupingControl1_QueryValue); </code></pre> <p>If you would like to allow saving the modified data in these fields at run time, <strong>SaveValue</strong> event can be handled in addition and the underlying data row can be set with the updated value(reverse of QueryValue event code).</p> <pre><code>//Method Invoked to populate unbound fields with respective values void gridGroupingControl1_QueryValue(object sender, Syncfusion.Grouping.FieldValueEventArgs e) { if (e.Field.Name == "T1_VALUE") e.Value = dt1.Rows[e.Record.GetSourceIndex()][e.Field.Name]; else if (e.Field.Name == "T2_VALUE") e.Value = dt2.Rows[e.Record.GetSourceIndex()][e.Field.Name]; } </code></pre> <p>These unbound fields also support sorting and filtering.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload