How do I add a blank row between each row in my DataGrid???

Hi I have got the following datagrid....But I want to add a blank row(that divides each row with some background color)....My datagrid is


<Asp:datagrid Allowpaging="true" Page-Index="5">
<columns>
<asp:TemplateColumn>
<ItemTemplate>
<Img src="sam.gif" width="200" height="150" />
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<ItemTemplate>
<table>
<tr><td><%#Container.DataItem("ID")%></td></tr>
<tr><td><%#Container.DataItem("Name")%></td></tr>
</table>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>

I tried to use a DataRow on the server side to add a new row but it adds the row in the format of the datagrid.....All I want is just a separator(row with some bgcolor) to separate the rows in datagrid....Ur help will be appreciated
0
cooldudeattitud
4/26/2004 3:50:44 PM
asp.net.getting-started 91979 articles. 4 followers. Follow

4 Replies
623 Views

Similar Articles

[PageSpeed] 15

The Datagrid does not support separator rows. You'll need to use a Datalist for that feature. (there are some hacks that will do it, but I haven't seen one yet that didn't cause more problems than it solved.)
Jim


MS MVP ASP.NET [VC++/MFC emeritus]


Old Dog Learns New Tricks

Preferred programming language: cuneiform on clay tablets
0
JimRoss
4/26/2004 3:54:20 PM
Hi Jim,

Thanks for ur reply....But I am using Datagrid since it allows auto paging........Ok I will try some other way...Thanks a lot once again...Any kind of help regarding this will be appreciated...
0
cooldudeattitud
4/26/2004 4:05:54 PM
Here is a link to an article that shows you how to do paging with the Datalist.


Paging a Data List

Jim


MS MVP ASP.NET [VC++/MFC emeritus]


Old Dog Learns New Tricks

Preferred programming language: cuneiform on clay tablets
0
JimRoss
4/26/2004 4:07:54 PM
Hi Jim,

Thanks for ur reply....I just created a Cascading Style Sheet to separate the rows......I added an extra row with background color filled...Thanks for the link 2.....
0
cooldudeattitud
4/26/2004 4:48:28 PM
Reply:

Similar Artilces:

How to set the row number and get the row number for ("selected row) in Datagrid
I face a problem that i can't get the selected row of the datagrid in both server side script (VB.net) and client side script (javascript) As i can't use the button column / hyperlink column in the datagrid. Thus , i need to handle the change the background color of the selected row and also to get the selected row number for Update/Delete. Thanks in advance. This depends on how do you perform the selection. Do you want to implement chaning of the SelectedRow at the client side without any postback? If you have no issues with postback, then you can do s little trick here: 1. ...

How to add values to DataGrid row by row
How do I add values to a DataGrid row by row without using a DataSource? Is this possible? Or should I just use a table? my code works like this: BoundColumn Col1 Add Col1 to DataGrid1 for every str in stringarray { Add New Row DataGrid1 with Col1 = str } Thanks. may be following URLwill help you http://www.123aspx.com/ReadReviews.aspx?res=359 Arvind Well, DataGrid was found not to make you do it the old way as in ASP 3.0. You can still get a datasource like datatable and then loop in it and display all the data row by row, is this what you want ? ...

How to add a blank row to a DataGrid?
Is there any way to add an empty row to DataGrid in order to add new records? Thanks! Check these - Adding a Row to an ASP.NET DataGrid and Adding Blank Rows to a DataGridHope this helps..Alvin ChooiMicrosoft ASP.NET™ Enthusiast v1.1 / v2.0, Malaysia Blog : http://alvinzc.blogspot.com Thanks a lot for all your replys!...

How to add a blank row to a datagrid
 Hi frds How to add a blank row to a datagrid?can anyone help me in thisthank uArchu  Hi,  Create a datatable. Fill it with data using an adapter. Bind it to the datagrid. To insert a new row, use the datatable's Row.InsertAt() and then rebind the table to the datagrid. Check this: http://www.codeproject.com/aspnet/ASPNET_DataGrid.asp   HTH,Suprotim Agarwal -----http://www.dotnetcurry.com-----ASP.NET Grid With Excel Capabilities | 27 GridView Tips & Tricks | Hosting your site? | SQL Server Tips Case 1: If your datasource is a collection eg, arra...

How to add dynamic row in between 2 existing rows in datagrid?
Is this possible to add dynamic rows in middle of the rows in datagrid?I want to find net total like thisPNo   SNo  status  day1  day 2  day3001     S01   Pack   10     30      20                    Used   05     01      20001     S02   Pack   20     10 ...

adding a blank header row /row above the header row
is it possible to add a blank row above the header row in gridview for adding some links and buttons the links will respond to thae data in the grid and the buttons are for login / regisration etc....  if yes how it can be done or how do i achieve it. Its better that u create a table with a single row with columns matching the GridView columns. Set the table width same as the GridView width. This will make the GridView Look as if there is a row above its header.Please do not forget to click Mark As Answer on the post that helped you. Regards,Iam Srikanth Reddy....

Add row to table with table.row.add()
Everytime I click on a button I want to add a tableRow to a table like this:        TextBox TB = new TextBox();                TableCell Cell = new TableCell();        Cell.Controls.Add(TB);        TableRow Row = new TableRow();        Row.Cells.Add(Cell);        table.Rows.Add(Row);It works the first time, but when I click the button again the last r...

Want to add blanks rows in the Datagrid
Hi, i want to places spaces between the rows that i have in the Datagrid. You can checn the table out at the following link. http://216.82.93.195/test/datagrid2.aspx <form runat="server"> <asp:DataGrid runat="server" id="dgAsad" BackColor="#eeeeee" Width="85%" PageSize="15" CellSpacing="0" CellPadding="4" GridLines="both" BorderStyle="solid" BorderColor="black" BorderWidth="1" HorizontalAlign=...

how i can get all the information of specific row on clicking of any place of that row in datagrid
in my datagrid i have 4 columns. Among these one column is Type. Suppose this column has 3 different type like 1. question 2. section 3. option. so if i click any row of datagrid then i want to call different aspx page according to columnType.for example if type is question thenon clicking on it. i want to call Response.Redirect("question.aspx?id=" + _id.toString);i. e. i want to call different aspx according to type of that column and also i want to sent querystring id to that specific id belonging to first column of datagrid.ex:-'id'     'create date'    ...

I want to add a blank row into tail of DataGrid
Hi all member!I have a Datagrid. When it have so many record, It will be shadow. And user can't find them. I want to if that, I want to add a blank row into tail of DaataGird.Thankas. Will your DataGrid contain rows of data already?DarmarkMark as Answer, if this reply answers your post....

add a blank row to show a message in a datagrid
how to show no data found message in a datagrid ie, I have a search box on top of a datagrid. If there is no matching search results how can i display No records found message in datagrid. Now its showing just the header and footer. I have used paging in my datagrid..hence footer with page number as 1 is displayed. My asp.net version is 1.1 and my code behind is vb. objadap = New OracleDataAdapter(sql, objcon)ds = New DataSet objadap.Fill(ds, "reporttab") DG1.DataSource = ds.Tables("reporttab") DG1.DataBind() Can I check for an empty datagrid and add ...

how to make entire row of a datagrid clickable & get the full row in code?
Hi, is it possible to get a server-side event when the user clicks on a datagrid row? The user shouldn't be forced to click on a certain column entry; instead the event should be raised wherever on the row area the click happens without using the select of the datagrid    Thanks in advance,  Linu  Hi linukalex , Yes , you can do that. see this article to learn how to do this: http://www.aspxboy.com/private/5450/default.aspxSamu ZhangMicrosoft Online Community SupportPlease remember to click “Mark as Answer” on the post that helps you, and to click “Unmark...

Dynamically add rows in the datagrid ..and enable view state in the previous rows, coloumns
Dear Developers, I have the datagrid below the structure.. ---------------------------------------------------------------------------------------------------------- Column1 Column2 Column3 Column4 Column5 ----------------------------------------------------------------------------------------------------------- dropdown1 dropdown2 dropdown 3 texbox nextbutton ----------------------------------------------------------------------------------------------------------- For my requirement .. i am sor...

add new row in datagrid, save all rows with just one trip to the server
I used a datagrid in my web app that can add a row dynamically. I added textboxes and radiobutton in the footer as the entry for new rows. Now, I want this new row to be added without posting back to the server then save them in the database with just one trip to the server. How will I do that? Hi, what do you exactly want? When I look at this sentence: this new row to be added without posting back to the server then save them in the database with just one trip to the server it becomes quite mystified to me. You can't add something to the database without a postback (or roundt...

Web resources about - How do I add a blank row between each row in my DataGrid??? - asp.net.getting-started

Want to preview our new DataGrid for Xamarin.Forms?
tl;dr Zumero.DataGrid is a Xamarin.Forms control for displaying data in rows and columns. If you would be interested in testing and previewing ...

Mad King DataGrid
This post is about scrolling in WPF and the egocentric DataGrid control. I’ll give the project background but if all you’re interested in is ...

Stack Overflow
Stack Exchange log in - careers - chat - meta - about - faq Questions Tags Users Badges Unanswered Ask Question Top Questions interesting 295 ...

Microsoft Silverlight - Wikipedia, the free encyclopedia
Microsoft Silverlight is an application framework for writing and running rich Internet applications , with features and purposes similar to ...

Flash Builder Plug-in for SAP Netweaver Gateway - Adobe Labs
Search Navigation Labs Home Wiki Home Technologies Alchemy Blueprint Camera Profiles and DNG Profile Editor Cirrus ColdFusion 10 DNG Codec Fireworks ...

Casaba Security » Products » X5s Testing Tool For Finding XSS Vulnerabilities
Security analysis, consulting, development and testing partners who understand your business strategy.

CodeGuru - Microsoft developers related ideas, articles, tips, tricks, comments, downloads, and so much ...
CodeGuru is where developers can come to share ideas, articles, questions, answers, tips, tricks, comments, downloads, and so much more related ...

Caliburn Micro: WPF, Silverlight, WP7 and WinRT/Metro made easy.
A small, yet powerful framework designed for WPF, Silverlight and WP7. It implements a variety of UI patterns for solving real-world problems. ...

Quick Answers - CodeProject
Questions - Free source code and tutorials for Software developers and Architects.; Updated: 11 Jul 2012

license-discuss@opensource.org: 11636: first draft of license proliferation committee report
FYI,the first draft report of the OSI's License Proliferation Committee.To join the OSI's license proliferation discuss email list, send anemail ...

Resources last updated: 12/7/2015 2:23:23 PM