Hello Everyone,
I have a data table with the following columns and rows as I showed below.
- DataTable dt = new DataTable();
- try
- {
- dt.Columns.Add("f1");
- dt.Columns.Add("f2");
- dt.Columns.Add("f3");
- dt.Rows.Add("ABC", "ATAG", "");
- dt.Rows.Add("abc", "atag", "");
- dt.Rows.Add("abc", "ATAGChild", "");
- }
- catch (Exception)
- {
- throw;
- }
Expected Output:
| f1 | f2 |
| ABC | ATAG |
| abc | ATAGChild |
where f1 and f2 is my column.


Piyush PansuriyaRank #454 · 5.5K reputationPosted Apr 10, 2019, 12:28 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 9, 2019, 11:00 PM EDT
Nikunj SatasiyaRank #302 · 8.3K reputationPosted Apr 10, 2019, 12:41 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Apr 10, 2019, 1:08 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 14, 2019, 11:46 PM EST