Help is needed. How do I print the entire table from DGV? I parse information from the database in this way:
private void LoadData() { string connectString = "datasource=localhost;port=3306;Initial Catalog= 'Rebel';username=root;password="; MySqlConnection myConnection = new MySqlConnection(connectString); myConnection.Open(); string query = "SELECT * FROM `Товары`"; MySqlCommand command = new MySqlCommand(query, myConnection); MySqlDataReader reader = command.ExecuteReader(); List<string[]> data = new List<string[]>(); while (reader.Read()) { data.Add(new string[4]); data[data.Count - 1][0] = reader[0].ToString(); data[data.Count - 1][1] = reader[1].ToString(); data[data.Count - 1][2] = reader[2].ToString(); data[data.Count - 1][3] = reader[3].ToString(); } reader.Close(); myConnection.Close(); foreach (string[] s in data) dataGridView1.Rows.Add(s); } After Parsa, I need to print it, I found in the search for printing a table, but it is not complete and distorted. Maybe there is some export in Exel or Word? thanks in advance