c# 4.0 - How to get datatable column values in comma separated based on another column which have repeated/duplicated values? -
i need data-table column values in comma separated based on column have repeated/duplicated values. based on first column value need comma separated values of second column each unique value in first column. below current table.
<table> <tr> <th>col1</th> <th>col2</th> </tr> <tr> <td>a</td> <td>aaa</td> <tr> <tr> <td>a</td> <td>bbb</td> <tr> <tr> <td>a</td> <td>ccc</td> <tr> <tr> <td>a</td> <td>ddd</td> <tr> <tr> <td>e</td> <td>eee</td> <tr> <tr> <td>f</td> <td>fff</td> <tr> </table>
expected output:
<table> <tr> <th>col1</th> <th>col2<th> </tr> <tr> <td>a</td> <td>aaa,bbb,ccc,ddd</td> <tr> <tr> <td>e</td> <td>eee</td> <tr> <tr> <td>f</td> <td>fff</td> <tr> </table>
thanks in advance...
Comments
Post a Comment