How to populate the values of multiple rows to gridview div using c#
example:
| id | number |
| 1 | 8768687865 |
| 1 | 8768768764 |
| 1 | 8768768678 |
| 2 | 7687687687 |
| 3 | 8768678678 |
| 4 | 8767876878 |
| 4 | 7878787878 |
| id | number |
| 1 | 8768687865 |
| 1 | 8768768764 |
| 1 | 8768768678 |
| 2 | 7687687687 |
| 3 | 8768678678 |
| 4 | 8767876878 |
| 4 | 7878787878 |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
samantaPosted Apr 22, 2014, 11:57 PM
Farhan ShariffPosted Apr 22, 2014, 9:18 AM
samantaPosted Apr 22, 2014, 9:10 AM
i want to fetch values from database table and diaplay in gridview
samantaPosted Apr 22, 2014, 8:46 AM
Farhan ShariffPosted Apr 22, 2014, 8:38 AM
samantaPosted Apr 22, 2014, 8:08 AM
Farhan ShariffPosted Apr 22, 2014, 8:04 AM
{
GridViewRow row = GridView1.Rows[rowIndex];
GridViewRow previousRow = GridView1.Rows[rowIndex + 1];
if (row.Cells[0].Text == previousRow.Cells[0].Text)
{
row.Cells[1].Text += " " + previousRow.Cells[1].Text;
previousRow.Visible = false;
}
}
http://www.codeproject.com/Articles/34337/How-to-merge-cells-with-equal-values-in-a-GridView
samantaPosted Apr 22, 2014, 8:03 AM
please share some code so that i can understand easily
Farhan ShariffPosted Apr 22, 2014, 8:02 AM
Munesh SharmaPosted Apr 22, 2014, 7:59 AM
http://stackoverflow.com/questions/5464193/populate-the-values-of-multiple-rows-in-single-row-in-gridview