I am converting the Rows as Columns using PIVOT in SQL Server. Keeping the result set in a DataTable and binding the DataTable with a GridView. As I want to generate the Column Dynamically based on the Rows, I am using PIVOT operation. How do I proceed if i don’t want to use DataTable and want to use a ViewModel in place of DataTable?
I am converting the Rows as Columns using PIVOT in SQL Server. Keeping the
Share
I’ve asked this question before but for winforms. I too had to pivot sql data. The answer was to make use of
System.ComponentModel.See top answer here:
Data binding dynamic data