We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date


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!!!

Live Chat Icon For mobile
Up arrow icon