Hi,
I have two Tables, OrderHeader and OrderDetail, with a One-Many relationship between Header and Detail.
On Button_Click(), I need to export the data to Excel. What is the best way to export them?.
I know I can store the table data in a datatable and use StreamWriter and to
write to a CSV file. But I am not sure about the part where I have to loop through the detail table (not sure how to search for the Master key in the detail table). Is this the right approach?
I would appreciate any help.
Thanks
rkingmdu
I have two Tables, OrderHeader and OrderDetail, with a One-Many relationship between Header and Detail.
On Button_Click(), I need to export the data to Excel. What is the best way to export them?.
I know I can store the table data in a datatable and use StreamWriter and to
write to a CSV file. But I am not sure about the part where I have to loop through the detail table (not sure how to search for the Master key in the detail table). Is this the right approach?
I would appreciate any help.
Thanks
rkingmdu