Danish Habib

Danish Habib

  • NA
  • 694
  • 245.9k

How to make rowspan based on condition in gridview

Sep 17 2015 2:06 AM
I have have gridview like below 
 
 
 As per you see in the grid view There are many columns ,Like Indicator,Name,District,Year,UserTypes,Village,Active,Status,Quarter,Target,Achieved,Varience etc
 
I want to make ROWSPAN on Column (TARGET) based on the condition the condition is that where there is where there is same Year and Quarter like 2015 and Quarter01 so there is Target =75 multiple times i Want to make row span of all these rows (But just of this column Target and show a target once , all other columns should remain the same as below check this i want
 Indicator Name Districts Year UserTypes VillagesActive  StatusQuarter  TARGET ACHIEVED
Varience 
 # of community members trained on child protection issues shazia mussarat Vehari FY-2015 CDF 63-KBn Yes A Quarter02 75 2 73
 # of community members trained on child protection issues shazia mussarat Vehari FY-2015 CDF Jhedu Yes A Quarter02 75 0 75
 # of community members trained on child protection issues shazia mussarat Vehari FY-2015
 
CDF
 64-KB yes          A Quarter01 110 80 30
 # of community members trained on child protection issues shazia mussarat Vehari FY-2015 CDF 63-KB Yes P Quarter01 110 18 92
 
Check above I have 75 Duplicated in first and second rows I want to marge the cell Quarter and make it one cell and place there 75 based on the condtion where year and Quarter are same in row , also in third row 110 and fourth row 110 on same year and quarter i want to merge this column target to one cell and show 110 there all others columns need to be same .The Condition is if year and quarter are same then merge the target column into one row and show target