AccessFormObjectOneFormToAnother

I want to obtain rows in datagrid in one form from another. For this I use !!!Error!!! CurrencyManager cm = (CurrencyManager)ListPoset.BindingContext[ListPoset.dataGrid1.DataSource]; int rowCount = cm.Count; //assumes datasource is a datatable... int colCount = ((DataTable)ListPoset.dataGrid1.DataSource).Columns.Count; for(int row = 0; row < rowCount; row++) { for(int col = 0; col < colCount; col++) { object cellValue = ListPoset.dataGrid1[row,col]; Console.Write(cellValue.ToString() + " "); } Console.WriteLine(""); } But I have an errors diring compilation <> Help me please!!! I am just a biginer in DotNet!!!

Loader.
Up arrow icon