How to build Master-Detail DataSet's in C#.NET

Hi everybody

As you know in Delphi we can have Master-Detail DataSet's
for example for AdoDataSet we have:

AdoDataSet1.MasterFields :='Fields List';
AdoDataSet1.IndexFieldName:='Fields List';
AdoDataSet1.DataSource:='Master Dataset's Datasource';

now i want to know how can i implement such a Master Detail Situation in C#.NET ? i need a code snippet.

Any help greatly would be appreciated.
Kind Regards.

Comments

  • edited 7:50AM
            private TfrxADOTableClass        master_table;
            private TfrxADOTableClass        detail_table;
    
    
            master_table = new TfrxADOTableClass();
            detail_table = new TfrxADOTableClass();
    
    
            master_table.DataBase = database;
            master_table.Name = "MasterTable";
            master_table.TableName = "master_table";
    
            detail_table.DataBase = database;
            detail_table.Name = "DetailTable";
            detail_table.TableName = "detail_table";
            detail_table.Master = master_table;
            detail_table.MasterFields = "Fields1\r\nField2\r\nField3";
    


    Just idea. I did not test this code yet.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.