title: How to display the master-detail tables into two xtragrid?
body: <p>I have to tables:users and messages.And create the one-many relations between these tables.And,If I display this two table in single xtragrid, it's no problem,But ,I want to display into two grid,the detail of messages doesn't display. please help me!</p>
  
  <p>the key code is :</p>
  
  <p>1.create the dataset of users and messages:</p>
  
  <pre><code>        DataSet ds = new DataSet();
          ds = SqlHelper.ExecuteDataset(fbh.ConnectionString, CommandType.Text, s);
          DataTable mess = ds.Tables[0];
          mess.TableName = "Messages";
          DataTable user = deptmentUserMessages.Tables["Users"];
  
          DataTable m = new DataTable("Messages");
          m.Merge(mess);
          deptmentUserMessages.Tables.Add(m);
          deptmentUserMessages.Relations.Add("**UserMessages**", user.Columns["UserName"], m.Columns["SENDER"]);
  </code></pre>
  
  <p>the deptmentUserMessages is the static dataset</p>
  
  <p>2.in the form.load event,I have to do:</p>
  
  <pre><code>        gcMessage.DataSource = master;
          gcMessageDetail.DataSource = detail;
  
          master.DataSource = pub.DeptmentUserMessages;
          master.DataMember = "Users";
          detail.DataSource = master;
          detail.DataMember = "**UserMessages**";
  </code></pre>
  
  <p>the master and detail are BindingSource.</p>