This is a migrated thread and some comments may be shown as answers.

System.InvalidCastException: Unable to cast object of type error

1 Answer 303 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ryann
Top achievements
Rank 1
Ryann asked on 20 Mar 2014, 01:01 PM
Hi
im exporting my grid to pdf but when using DateColumn its raising error System.InvalidCastException: Unable to cast object of type error

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Mar 2014, 03:15 AM
Hi Ryann,

Please try the following code snippet for your grid. Provide your full code snippet for further help.

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
  if (e.CommandName == RadGrid.ExportToPdfCommandName)
  {
    RadGrid1.MasterTableView.AllowFilteringByColumn = false;
    if (!RadGrid1.ExportSettings.IgnorePaging)
    {
     RadGrid1.Rebind();
    }
  }
}

Thanks,
Princy
Tags
Grid
Asked by
Ryann
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or