Multiple grid rows per Data row in GridView

I have a dataset that is binded to a gridview.

The dataset has 5 fields and a description.

I want to display 1 row for the 5 short fields and 1 row underneath it for the description. (per record)


For example:

ID Name  Surname Field3 Field 4

1   John     Smith      blah    blah    

This is the long description for  John Smith spanning 5 cells

2   Peter    Parker     blah    blah    

This is the long description for Peter Parker spanning 5 cells



8/6/2006 12:39:07 PM 72751 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 38

Hi, Madlo:

I have a sample to add a row under each  bounded row in RowCreated Event. May it helps 

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
        GridViewRow gr = new GridViewRow(0, 0, DataControlRowType.DataRow, DataControlRowState.Normal);
        TableCell mc=new TableCell();
        mc.Text = "what you like";

Best Regards,
Rex Lin
Microsoft Online Community Support

This posting is provided "AS IS" with on warranties, and confers no rights.
8/7/2006 8:39:30 AM

Similar Artilces:

Add new controls to a gridview row; when editing that row using the edit row feature in the gridview control.
Hi all  I have a questions that looks hard / complex to me, and i know you can help me in this. Q {  I have row in a Gridview and i have an edit option to it. I press the edit button, to edit the values in that row and update data all the way back to the database. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. (for now only plain text boxes appear.) } I hope you understand my question, all i need to do is replace the text box controls with a dropdown list when i am editing a row in ...

Data Controls insert rows into gridview then insert rows from gridview into SQL Table
Hello there, I'm still new at performing miracles with code . Currently I am having trouble with my latest coding adventure I have a web application which records jobs and labour assigned to jobs. The issue in particular I'm having is the way in which labour is to be assigned. I want to use standard controls (Textbox, Dropdownlist) to record the values into a gridview (ie,put multiple rows into the gridview using the controls). Then, when all the inserting is complete, the user clicks a submit button to insert all the rows from the gridview into a database table. The reason for...

add data from multiple rows in table to one row in gridview
 heya is there any way of adding data from multiple rows in table to one row in gridview. eg. ipc                 column 1 ,            2 ,                       3,                 4  1,    11111                 33                  &nbs...

Can you display data from a single row in multiple rows using a GridView?
I am currently displaying 3 fields in a gridview and it looks something like this:First Name Last Name Age ======== ======== === Chris Messineo 40 John Smith 35 Tim Jones 30I need to modify the gridview and display a bio, but I want it to display on 1 full line below each line, like this:First Name Last Name Age ======== ======== === Chris Messineo 40 Chris was born in a log cabin... John Smith 35 At the age of 10 John invented... Tim Jones 30 Mr. Jones was always a curio...

Arranging data on multiple rows into a sigle row (converting rows into columns)
Hello, I have a survey (30 questions) application in a SQL server db. The application uses several relational tables. The results are arranged so that each answer is on a seperate row: user1   answer1user1   answer2user1   answer3user2   answer1user2   answer2user2   answer3 For statistical analysis I need to transfer the results to an Excel spreadsheet (for later use in SPSS). In the spreadsheet I need the results to appear so that each user will be on a single row with all of that user's answers on...

Populate row by row data in gridview
Hi , How to populate the data row by row in grid view. For example: I wirte this code in .aspx page <asp:TemplateField HeaderText="COC Date of Calibration">                <EditItemTemplate>                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# COC_Date("strDate") %>'></asp:TextBox>       &nbs...

Accessing GridView Data Row By Row
guys i have just started with i have a basic doubt, i have created a SQL datasource and a gridview associated with it now what i need to do is get all the data from my database n modify it further, for this i need to access each row of the gridview any ideas on how to do so? foreach(GridViewRow row in GridViewName.Rows) { you can interate like this..  }Better Post your code before asking some thing, some one. So that person helping u will understand u r problem ClearlyYahoo IM : dotnetrulerI am trying to keep Frequently Asked Questions in my blog  When u enable show...

Is there a control that offers the same data presentation as a GridView, but allows users to copy and paste many rows/columns at once?
 Hi Is there a control that offers the same data presentation as a GridView, but allows users to copy and paste many rows/columns at once onto the grid? What I mean is some grid that 's as flexible as MS Excel grid for example.  Any suggestions will be very much appreciated.E The Repeater control is a highly customisable data presentation controlRohin.NET developerNever trust a computer you can't throw out a window. - Steve WozniakPlease remember to click on 'Mark as answer', if this post helped you......

How do I "row-wrap" ? i.e., have 2 rows of headers, and 2 rows in grid for each data record?
Hi I have built a view in Sql Server, and built my Sql Data Source, and everything looks good... I have my data grid populating nicely. But, I want the headers and rows to wrap - not inside each cell, but to fit the page. Let's say I have 10 columns, and only 5 will fit in the width of a webpage.  I would want the headers to wrap, so there are two rows of headers, then each data record would fill 2 rows in the grid. Example:  <headers> Last Name................First Name.............. Middle Name.............DOB............SSN............. <end of this row in grid>...

copy data from excel row to gridview row
Hi All, I need to copy data from excel to gridview. I have to select a row and press Ctrl+C to copy from excel, then I have to paste it in Gridview. Thanks in advance. I dont think you can Copy and Paste data from Excel to Gridview.But you can export data from Excel to GridView control, please check the below articles. a Reply as 'Answered', not only GAIN us some POINTS, but it also HELP others to find RIGHT solution....

Multiple rows of data into 1 row results?
Is there a way to get multiple rows of data to show in 1 row of results? I have a Data Table (ID, Name, Date, etc), Facility Table (ID, Name) and FacilityKey Table (Data ID and Facility ID). The Data table has a 1 to many relationship with the FacilityKey table. I want to return the Data ID and each Facility Name associated with that Data ID to display in a DataGrid (preferably each Facility Name in the same cell on the grid too), but am stumped on how to get teh query to work (or where to look in the SQL documentation for something like this). Thanks! What you are trying to do is...

select multiple rows with its row highlighted in GridView
Hello everyone, I'm not using any checkbox or select command to select the row in the GridView, I use the "RowDataBound" event in the GridView for the "onmouseover" click and row select.  That works fine for me but I want to have the functionality to select a multiple rows with its row highlighted and have a row selected count. For example, If I select a row, it hightlights that row and if I select another row, it will do the same thing and have the previous row still highlighted.  I have been looking for a way to implement this but can't find a ...

Blank row, every other row in data grid
Hmmm, here's a tricky one... How can I programatically add a blank datagrid row, every other row, to a bound data grid? Here's what I want to accomplish... I want the odd rows to be a master record, and then the even rows to contain another datagrid with details. I've seen all the posts and how-tos about nesting data grids, but quite honestly, it looks like crapp and it wastes screen real estate. My plan is to colspan the even rows so that the data grid fits nicely in there. Any ideas? Thanks,Rob Do you require sorting and paging? If not, you could use t...

Multiple row selected in a grid with colored rows
I have a grid that have different colors rows based on some criteria. when I select multiple rows that have a color, the rows do not show the selected blue color. It does show a dot next to the row but the color stays Aqua. this happens only if I have more than one colored row selected. here is my code in Builder 6. Any ideas? void __fastcall TFormUCPFilingDetail::CRDBGrid2DrawColumnCell( TObject *Sender, const TRect &Rect, int DataCol, TColumn *Column, TGridDrawState State) { if (QryCaliforniaResponses->FieldByName("NoOpenTasks")->AsString...

Web resources about - Multiple grid rows per Data row in GridView -

Multiple sequence alignment - Wikipedia, the free encyclopedia
A multiple sequence alignment (MSA) is a sequence alignment of three or more biological sequences , generally protein , DNA , or RNA . In many ...

Jakarta attacks: Multiple bombs hit Indonesian capital
ISIS has claimed responsibility for the grenades and crude homemade bombs used to stage a Paris-style attack in a busy business and shopping ...

Jakarta attacks: seven dead in multiple attacks linked to Islamic State
Jakarta is on highest possible alert for terrorism, after multiple explosions hit Central Jakarta on Thursday.

Jakarta attacks: seven dead in multiple attacks linked to Islamic State
Seven people have been killed in a terrorist attack in central Jakarta, including five who are believed to be perpetrators linked to the Islamic ...

Feature Request: Apple TV 4 needs a way to watch TV shows from multiple sources in one universal app
... coverage of AAPL Company , Apps , and iOS . What do you think? Discuss "Feature Request: Apple TV 4 needs a way to watch TV shows from multiple ...

Google Seeks Multiple Auto Partners for Self-Driving Car Unit
Google hopes to form partnerships with many automakers and suppliers as it develops self-driving cars to reduce traffic accidents and expand ...

Multiple Explosions, Gunfire Rock Jakarta In Deadly ISIS-Claimed Attack
At least seven people died, including five assailants, a police spokeperson said. Multiple explosions and a gun battle rocked Jakarta, the capital ...

Ramon Foster: Multiple Bengals Spit On Steelers, Not Just Burfict
Steelers OL Ramon Foster joins The Fan Morning Show

Jamie-Lynn Sigler says she has multiple sclerosis
The actress ​said that she has been living with MS for 15 years.

Flair’s Smart Vent System Controls the Temperature in Multiple Rooms
This time last year, we took a look at how Keen Home was changing up smart home temperature control with their KeenVent , a smart vent that could ...

Resources last updated: 1/20/2016 7:55:06 PM