hi i found an article in codeproject as DataGridPrinter that print datagrid good. but it has written with VB.Net and i want it in csharp. when i create dll in VB.Net and i use it in c# the following error shown me :
Unable to cast object of type 'System.Windows.Forms.BindingSource' to type 'System.Data.DataTable'
and when i set Datagrid1.DataSource = ds1.Tables["Table1"]; the following error shown me :
//in Line 374 Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
how to solve my problem and do you have a other class that print datagrid in C# with header and footer ? thanks ..