//Panel dret private void dataGridView1_CellEnter(object sender, DataGridViewCellEventArgs e) { if (compte != null) { if (e.RowIndex < compte.moviments.Count) { Moviment reg = compte.moviments[e.RowIndex]; //Info row String str1 = ""; Dictionary <String, Int32> diccionariCategoriesConcepte = compte.DonaCategoriesConcepte(reg.Concepte); foreach (var keyValue in diccionariCategoriesConcepte) { str1 = str1 + String.Format("{0} - {1}", keyValue.Key, keyValue.Value) + "\n"; } label1.Text = reg.GetString() + "POSSIBLES CATEGORIES" + "\n" + str1; //Llista categories String str2 = ""; Dictionary <String, Int32> diccionariCategories = compte.DonaCategories(); foreach (var keyValue in diccionariCategories) { str2 = str2 + String.Format("{0} - {1}", keyValue.Key, keyValue.Value) + "\n"; } label2.Text = "\n\nCATEGORIES:" + "\n\n" + str2; } } Int32 totalMoviments = compte.moviments.Count; Int32 totalMovimentsNoRevisats = compte.moviments.Where(m => m.Revisat == false).Count(); Int32 totalDeshabilitatsAmbCategoria = compte.moviments.Where(m => m.Categoria != null && m.Deshabilita == true).Count(); label3.Text = "( " + totalMovimentsNoRevisats + " moviments no revisats de un total de " + totalMoviments + ") ( " + totalDeshabilitatsAmbCategoria + " moviments deshabilitats amb categoria )"; }