数据与数据集的关系,并绑定到数据网格中. [英] Data relation with dataset and binding into datagrid..

查看:74
本文介绍了数据与数据集的关系,并绑定到数据网格中.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的项目中,我已经将表存储到数据集中.该数据集中包含四个表.现在我想关联数据集中的数据并绑定到datagrid ...

谢谢...

In my project, i already storee the tables into dataset.. that dataset contains four table. now i want to relate the data in dataset and binding into datagrid...

Thanks...

推荐答案

I think this code will help to you
follow the following steps
1.Create object of DataRelation class
  Exm.DataRelation drl = new DataRelation("Relation Name","Parent Column","Child  Column",true);
2.Set Relation property of DataSet to that DataRelation
  Exm.Dataset.Relations.Add(drl);


这篇关于数据与数据集的关系,并绑定到数据网格中.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆