To fill the GridView with data I use custom bindings with sql query.
See GridViewCustomBindingGetDataHandler:
C# public static void GetData(GridViewCustomBindingGetDataArgs e)
{
var command = queryBuilder.GetSqlCommand();
using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrins["Main"].ConnectionString))
{
command.Connection = connection;
connection.Open();
var dataTable = new DataTable();
dataTable.Load(command.ExecuteReader());
//e.Data=???
}
}
The set of columns for the query is generated dynamically, so I do not have a typed container class to wrap the result.
How can I pass data to the Data property?