Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
955
How to set the data relation in ultragrid?
posted

There are three tables and exsits some relation among them by filed, Now I Want to show the three tables using three ultragrid
how to set the relation among them?(in winform)

fields of Table1: ProvinceCode,ProvinceName
fields of Table2: ProvinceCode,CustomerCode,CustomerName,Address,Telephone,Fax
fields of Table3: CustomerCode,OrderNo,MaterialNo,MaterialName,Qty,Remark

the top level ultragrid shows table1,the second ultragrid shows the data of table2,the third ultragrid shows table3
table1 use provincecode to link table2,table2 use customercode to link table3

 

Thanks!


 

  • 20872
    Offline posted

    Hello,

    Basically the UltraGrid will show the same hierarchy as the Data object the you supply to it. Saying that one approach would be creating a DataSet which will contain the mentioned Data Tables, with the proper relation between them and the hirarchy between the data tables, and once the DataSet is set, just supply to the DataSource property of your UltraGrid like:

    ultraGrid1.DataSource = yourDataSet;

    Please let me know if you need any other assistance.