Click here to Skip to main content
13,510,146 members
Rate this:
Please Sign up or sign in to vote.

I'm creating a grid view, the output I'm getting is like this:

<img src="" border="0" alt="grid view photo gridview_zpsc34ad4d5.png"/>

But I want the output as distinct GroupName and the Name should be separated by comma (,)

<img src="" border="0" alt="grid 2 photo gridview2_zps739c97d6.png"/>

wanna wanna do it via. code side of the page

Thank You

p.s. i cannot change the query string
Posted 10-Sep-13 7:06am
Updated 10-Sep-13 7:46am
Sergey Alexandrovich Kryukov 10-Sep-13 13:12pm
Looks pretty trivial. so far? what's the problem?
write2varun 10-Sep-13 13:18pm
I know what to do but I don't know how to do
Sergey Alexandrovich Kryukov 10-Sep-13 13:22pm
Do what? Generate HTML code with a table and cells in ASP.NET? Or get the data from database?
write2varun 10-Sep-13 13:24pm
i wanna get data from database into the gridview in that format
RyanDev 10-Sep-13 13:26pm
Where are you stuck?
write2varun 10-Sep-13 13:28pm
I don't know how to merge the value of rows and separate them with a comma
RyanDev 10-Sep-13 13:35pm

You want to concatenate your rows into a column.
write2varun 10-Sep-13 13:39pm
yes, please let me try this
write2varun 10-Sep-13 13:41pm
Sorry I can't change anything in the query
RyanDev 10-Sep-13 13:52pm
In that case just loop through your records and process it however you need.
write2varun 10-Sep-13 13:57pm
okay, i will try it
Sergey Alexandrovich Kryukov 10-Sep-13 14:21pm
Then what prevents you from doing that? Do you have problems with ADO.NET? HTML? Writing HTML using ASP.NET? Understanding ASP.NET?
write2varun 11-Sep-13 0:56am
i will try to bind the rows using if and foreach

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180417.1 | Last Updated 10 Sep 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100