Hi,
I would like to know if it is possible to create a table with dinamic columns, these columns are created according to one field of my dataset. For example:
The field "countries" returns the values: USA, Brazil, England and France... but more countries can be added to the field by the user, so I'll need to add a new column for each contry added.
Can I do this in the report?
Dinamic columns in table
-
- Posts: 6
- Joined: Wed Apr 13, 2011 2:24 pm
Dinamic columns in table
Hello,
Maybe we did not completely understand your question, in the future you want to do with this table.
You can use the following code to create this table:
Thank you.
Maybe we did not completely understand your question, in the future you want to do with this table.
You can use the following code to create this table:
Code: Select all
DataTable dt = new DataTable();
foreach (DataRow row in DataSourceName.Rows)
{
dt.Columns.Add(row["CountryName"]);
}