In this article, we want to discuss about how to merge gridview with equal values. Before we get started, if you want to know about split with any delimited string, please go through the following article: Call JavaScript function from code behind in C#.

There are a lot of methods in the Internet solving the problem of how to merge GridView rows if neighboring cells show equal values. My approach is not the first; however, I think, it is rather universal and very short – less than 20 lines of code.

The last action is to add an OnPreRender event handler for the GridView:

Leave a Comment