Shovan Saha

Shovan Saha

  • NA
  • 321
  • 91.2k

Count of types from datagridview

Sep 16 2018 11:25 AM
I have a datagrid view like this:
private void Form1_Load(object sender, EventArgs e)
{
AddRowsInDatagridView(0,"Rohim", "Apple", "3", "2");
AddRowsInDatagridView(1,"Karim", "Banana", "", "3");
AddRowsInDatagridView(2,"Karim", "Guava", "5", "7");
AddRowsInDatagridView(3,"Rohim", "Coconut", "6", "8");
AddRowsInDatagridView(4,"Karim", "Banana", "3", "5");
AddRowsInDatagridView(5,"Rohim", "Jackfruit", "2", "9");
AddRowsInDatagridView(6,"Rohim", "Apple", "1", "12");
AddRowsInDatagridView(7, "Rohim", "Apple", "1", "12");
AddRowsInDatagridView(8, "Karim", "Guava", "5", "7");
AddRowsInDatagridView(7, "Rohim", "Palm", "1", "12");
AddRowsInDatagridView(8, "Shovan", "Date", "5", "7");
AddRowsInDatagridView(9, "Karim", "Banana", "3", "5");
}
 
Expected:
Rohim has = 4 types of fruit.
Karim has = 2 types of fruit.
Shovan has = 1 type of fruits. 
 

Answers (3)