Displaying one of the columns in GridView data as GroupBy or similar data one after another row


Would like to know the property or code that will Group data in one of the columns of GridView together.

In other words i like to display the columns data in GridView that is repeated more than once together.

Example: say Column heading









You can see john or jim is displayed in Name Column at various rows. I like to get them displayed together such as






-- "Mark As Answer" if my reply helped you --
1/13/2008 8:37:55 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 47


I am not too sure, but may be you can try a "Order by" clause at your SQL level. Say,

Select Name, Field 1, Field 2, Field 3 from Table Where <Clause> Order by Name

Hope this helps


If the reply answered your question please Mark it as "Answered". This would help people know that the question has been answered.
1/14/2008 4:24:03 AM

You can Use ORDER BY in your Query like

SELECT * From Table1 WHERE <Clause> ORDER BY Name

Use that in your query before you display it in the Grid 


"Code, Beer and Music" that's my way of being a programmer!

How to get your Forum Question Answered | Blog | CodeASP.NET
1/14/2008 4:35:39 AM

Similar Artilces:

I want to display data column names in more than one row in gridview for display
    Name   Age    Address data    data   data Phone    Mobile data       data I'm thinking a GridView is probably not the best approach for what you want to do. Instead, I'd probably use a Repeater as my parent control, and then use either embedded GridViews or a UserControl which contains GridViews in it.Thanks, EdMicrosoft MVP - ASP/ASP.NET...

Data presentation control in another Data presentation control
 Hello,I want to make a menu with datalist or gridview control.Basically,the menu will be like this,Categories     Sub Categories.For example, for COMPUTING category there will be NOTEBOOKS DESKTOPS etc.There will be a image for CATEGORIES and linkbuttons with Subcategories.If I put a datalist inside a datalist and a link button inside the second datalist visually it satisfies my need.However,CommandArguments come from database to linkbutton.Andwhen one of these command buttons is cliked it must go to proper page.I dont know how to wrie an event_handler ,specifically, for...

Move data from one column to another column and row
I need some help converting a table which has one row for each year.  Displaying the data so the each row will contain all of the information for the title and all of the years displayed in separate columns. I have a SQL Querry which returns the data looking like this (the querry is grouping by Title and by year, then adding up the quantity of rows): Basic Information needed for Life Insurance 25 2005 Basic Information needed for Life Insurance 45 2006 Ea Chairmans Conference 10 2005 EA Chairmans Conference Press Release 33 2005 EA Chairmans Conferenc...

appending data from one column to another column in gridview
 Hi,I have 2 columns in table..like this,Area    Areaunit100       sq.feet200       sq.yard400        meters  While showing area in gridview, i want to append its unit . Example 400 meters should be seen and not just 400<asp:BoundField DataField="area" HeaderText="AREA" SortExpression="area" />  Please Mark the post as "ANSWER" if it helps you One way is using template field, check this code..  <asp:TemplateField HeaderText="AREA"> <It...

merging data from one data row into another
I have a data table that is holding agenda related information from the database. I currently have it setup to display all of the rows for the specific event. Well that works fine, except for there are times when one event has multiple speakers, and as result it comes out like this - Time EVENT Name Speaker1 Time EVENT Name Speaker2 What I need it to be is this - Time Event Name Speaker1, Speaker 2 Any ideas on how I can do this? Currently I build the table through a stringbuilder control. With a foreach statement that loops through the data table. T...

Displaying two rows of database column data in one row of datagrid
Hello, I am trying to display two rows of an access column on one row of datagrid. Is that possible? Example of my intended datagrid: courseNo of course1courseNo of course2 courseNo of course3courseNo of course4 here's the HTML view of my aspx file: <Asp:datagrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP: 40px"    runat="server" AutoGenerateColumns="False" Height="320px" Width="488px">    <Columns>     <asp:TemplateColumn>      &...

-- Need to Display data in two GridView controls, but second one could not be displayed?
Dear all, I wrote a code segment to display data in two GridView controls one by one as below. The first one is displayed ok. But, the second one is not displayed. Did I miss anything?         ads.DataFile = "~/App_Data/color_match_live.mdb"                ads.SelectCommand = "SELECT COUNT(*) FROM [tech_mstr] WHERE [month] = ?"        ads.SelectParameters.Add("month", sel_month)        Di...

display data from a gridview to another one
Hello, I want to display my data in another gridview once I click the hyperlink button. any help is highly appreciated.This is my gridview structure: <asp:GridView ID="gvCategory" runat="server" AutoGenerateColumns="False" GridLines="None"> <Columns> <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="faq.aspx?id={0}" DataTextField="Name" /> <asp:TemplateField> <ItemTemplate> <tr> <td><%#DataBinder.Eval(Container.DataItem, "Desc")...

Ive got some data that I want to display in a gridview.  There will be several rows that are a group, with the first column of data being identical.  How can I display this only on the first row, but not on the others, until the data changes to a group ? Check out goldbar,s online shopping cart tools,online email tools,online shopping cart tools.http://www.goldbar.net...

Help with copying data from one gridview to another gridview on another page
Hello,I have a page, frmJobListings.aspx, with a data grid that is populated with data from a table called, tblJobPostings.  I would like to copy all rows of data from three of the columns, JobRefNum, JobRequirements, and JobTitle on the page and populate a datagrid on another page called, frmJobDetails when I click on a button called, btnJobDetailBuilder. Problem: When I click on the btnJobDetailBuilder the page frmJobDetails opens but does not display the datagrid, errors, or any information.  I know that I need to do a data bind, but not sure if or how to databind to the 'Re...

How to speed up the data assignment from one data window to another data window ?
I have a report program that need to show three different periods of sales data for my users. I used a datastore ( called 'dw_source' ) to hold these information and then used three 'for loops' to assign individual sales data to related period columns into the final data window ( called 'dw_target' ) that will be displayed for the users. The number of columns on the report group are user selected and the program will do all grouping and subtotal when the group data changed ( is a dynamic created data window ). The time needed to do the the assingment from &...

gridview data field works in one control but not another
I can't figure out why it works on the hyperlink control but not an imagebutton using the onClientClick.This is what gets written out: onclick="alert(&quot;&lt;%# cstr((DataBinder.Eval(Container.DataItem, &quot;WELL_LOG_NO&quot;))) <ItemTemplate>    <asp:ImageButton ID="ImageButton1" runat="server"                                imageurl="images/camera.gif"        OnClientClick='alert("<%# cstr...

display a gridview's data as it is in another gridview data
Hi all, Following is my requirement  I have 2 pages..in one page i have placed the gridview control and binding in following way I am binding using Dataset to gridviewGridview1.DataSource = ds.Tables["Data"]; Gridview1.DataBind(); Now in the 2nd page..i need to display as it is data present in gridview of the first page but my gridview in the 2nd page will be like Gridview myGrid=new Gridview(); For this grid i need to show the data of gridview present in 1st page... I don't want to keep the dataset in session and pass it to next page and bind it overthere.....

i have work on gridview control.in that i have 3columns.name as subject,bookname,link. in this some link column data are very large.according to that data(no spaces in that data)gridview has changed.i
hi,i have work on gridview control.in that i have 3columns.name as subject,bookname,link. in this some link column data are very large.according to that data(no spaces in that data)gridview has changed.i want display half of the data and remaining display like this.(ex:http://ww.yahoo.com...........).how can i display like this,and one more thing is always the column size will constant. Try something like this: <asp:templatefield headertext="Link"> <itemtemplate> <asp:hyperlink id="HyperLink1" runat="server" navigateurl='<...

Web resources about - Displaying one of the columns in GridView data as GroupBy or similar data one after another row - asp.net.presentation-controls

List of birds displaying homosexual behavior - Wikipedia, the free encyclopedia
This list includes birds for which there is documented evidence of homosexual or transgender behavior of one or more of the following kinds: ...

Facebook Displaying Page Insights On Page Admins’ Personal Pages?
Some Facebook page administrators are seeing modules on their personal pages displaying page insights ad, campaign , and like totals for pages ...

Facebook Displaying Unread Messages from Pages in a New Updates Module
Facebook is displaying a new “Updates” sidebar module which shows some users unread messages sent to them by Pages. Users will see the Updates ...

Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air CNN Live - YouTube
Don Lemon Holds Up Sign Displaying the N-Word, Uncensored, on Air Lemon held up a Confederate flag first before holding up the sign. He asked, ...

Hazelwood coal mine fire: Morwell residents displaying symptoms similar to cigarette smokers, expert ...
An expert says some locals near Victoria's Hazelwood mine fire have symptoms similar to cigarette smokers.

Police accused of displaying fake G20 weapons
Toronto's top police officer misled the public by displaying fake weapons used in a medieval-themed role-playing game to help justify their actions ...

Displaying calorie labels at fast-food restaurants doesn't appear to work: study
While the high calorie counts of artery-clogging fast foods are often printed right in front of our eyes, most people ignore them and go ahead ...

Jays' Escobar suspended three games for displaying slur
Toronto Blue Jays shortstop Yunel Escobar has been suspended three games for displaying a homophobic slur on his eye-black during a game on Saturday. ...

Google Play Store now displaying age-based ratings
We reported back in May that Google was adding age-based ratings to all apps in the Play Store as determined by the International Age Rating ...

Google begins displaying “Listen Now” ads for streaming music services (including Beats) in search results ...
... , Streaming Music Continue reading more about Apps , Google , and Spotify at 9to5Mac . What do you think? Discuss "Google begins displaying ...

Resources last updated: 12/6/2015 3:23:46 PM