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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -