I have a grid that returns 8000 results, and I would like to filter these results by date and store them into a new datatable and rebind later. I receive this error:
Input array is longer than the number of columns in this table.
What are my options?
if (e.CommandName == "Filter")
{
DataTable dt = new DataTable();
foreach (GridDataItem item in RadGrid2.Items)
{
for (int i = 0; i < RadGrid2.Items.Count; i++ )
{
dt.Rows.Add(item);
}
}
You have to add columns to your DataTable td. Items cannot be added to nowhere.