Header separator row each 7th row.


I have a nice gridview generated from a ObjectDataSource upon a generic list. The grid displays a long list of days with some different columns following. Before each date that is for instance a Monday, I would like to generat a row with a header, like Week 23, Week 24 and so on (fetched from the dates).

I have noticed this event that i might be able to use:

Protected Sub GridView_RowCreated(ByVal sender As Object, ByVal e As GridViewRowEventArgs)

But actually I have no idea how. I will need to test the date on each row creation and when it is a Monday i will have to somehow add a row to the gridView that I can format the way I like.

Kind regards and thanks in advance. Very Very Very Thank you :)
Jesper Wilfing

Angel Bonus Question: As you can see in the example above, the gridview writes 00:00 (this column is a formatted date column) when the date is 0. I would like to display nothing when this is the case. Is this possible?

9/6/2007 4:44:21 PM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 28

To do grouping have a look at this article http://aspadvice.com/blogs/joteke/archive/2006/02/11/15130.aspx

Bonus Answer: 

function SetTime(byval aDate as Object) As String
  If IsDBNull(aDate) Then
      return String.Empty
      return CDate(aDate).ToString("hh:mm")
  End If
end function
<asp:Label runat="server" 
9/9/2007 9:53:49 PM

Similar Artilces:

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 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 ...

First Row, Next Row, Prior Row, Last Row
I have a SQL Anywhere 7.0 Database, have a table Product_detail which contains Column Name Datatype width Null Default batch_id char(10) No None prod_id Integer No None employee_id Integer No None quantity Integer No None price Numeric (14, 2) No None Its primary key is batch_id I have a Freeform Datawindow with this table I want to provide the first row, next row, prior row and last row Ho...

Scroll row by row in a datawindow control
Hi. I have a tabular datawindow object with one group and all my data is displayed in the header group and the detail band is not visible. when i run my application and i want to scroll the data the datawindow control scrolls the data page by page and i need it row by row. How can i do this? thank you in advanced You will have to move your data into the detail band. "Row" in datawindow is contents of the detail band. Igor "Fernando Pe�a" <Fernando_Pe0xL1A4za> wrote in message news:943886BF87C590640077873785256A65.0077874785256A65@webforums.....

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>...

How To: Reference controls in footer row from an item row
I'm familiar with using the e.Item.FindControl command when manipulating controls from an item row or footer row when you are actually in (editing) that row. I'm also familiar with determining what "Type" of row I'm in. What I'm having troubles with is referencing a control in the footer row of a datagrid while I'm actually in (editing) an item row. Can this be done? Thanks Mike...

Returning only the Header Row instead of all the relevant rows.
Hi All: My below sub in application is returning only the Header Row instead of the relevant rows I guess therez problem in my "str" Syntax. However I fail to understand where exactly is it faultering. Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click Try con.Open()Dim empID As String = txtEmpID.Text Dim FName As String = txtFName.Text Dim LName As String = txtLName.TextDim str As String = "Select Emp_ID, Emp_FName,Emp_LName,Emp_Address1,Emp_HNo,Emp_MNo from Emp_Details where Emp_ID='" &a...

ADO.net problem: i can not view image data for the rest of my table rows except the image for the first row but i can read all the other non image fields for all rows.
Hi i have a table with the following fields imgid............int imgdata........image imgtitle.........varchar(max) imgType........varchar(max) imgLength.....bigint incident_id.....int i have no problem with uploading the image but viewing the uploaded image(s) in a gridview has caused me great pain. The probelm is i have two pages. page1 grabs the image to display and page2 has a gridview that displays the grabed image. I wanted to have an sql statement like SELECT * FROM mytable WHERE incident_id=someValue. IF i have 5 records in this table and i view page2 ...

DetailView (Header in one Row and Item or Value in other Row)
My second question is, how can I put header in one row and ItemValue in other row. Currently the detail view is showing data as following structure: FieldName:         FieldValueFieldName:         FieldValueFieldName:         Listitem1                           Listitem2            &nbs...

accessing row by row
first of all sorry if i posted this in a wrong place but i'm new to powerbuilder and i have to develop a program quite quickly ( i only worked with acces until now) i have been provided a excel spreadsheet that contains all coloms and rows from all tables wich i have to insert in a database. The difficulty is that i can't use a datapipeline because i need to use a string function to check in wich table i have to put it: TABLENAME_COLUMNNAME -> i thought about using the string function to find out the right column in the right database. however i don't know how you ...

Gridview with multiple header rows
Hi, I have just installed the CSS Friendly Control Adapters and now my gridviews are not displaying dynamically added header rows. Code for adding rows is like so: Dim headerCell As New TableHeaderCellheaderCell.ColumnSpan = gridview.Columns.Count headerCell.Text = headingDim rowHeader As New GridViewRow(0, -1, DataControlRowType.Header, DataControlRowState.Normal) rowHeader.Controls.Add(headerCell) CType(gridview.Controls(0), Table).Rows.AddAt(0, rowHeader)   This is typically used for adding a nicely formatted heading row and it is a requirment that i must have this extr...

How to get the row index of a selected row in listview control
Can someone please tell me how to get the index of a selected row in a listview.  <ItemTemplate> <asp:LinkButton runat="server" class="linkButton" id="xxxxx" Text='<%#Eval("documenttype") %>' CommandName="OpenFile" CommandArgument='<%#Eval("DocumentKey") %>'></asp:LinkButton></ItemTemplate>what you have to do is, in itemcommand event of ListView, you have to get the value of row indexif(e.CommandName == "corrospondingcommaandname"){     &nb...

retrieving from row # to row #.
I have over 750 000 rows to retrieve from a table using a datawindow, but my system can only handle approx 30 000 rows and I would like to start from the end of the table. Is it possible to set the row numbers to retrieve? For example, start the retrieve from row 750 000 and stop at row 720 000. There must be a way. thanks, Vern what backend are you using? <Vern> wrote in message news:6BA241541AAD7F2F0063357385256C40.0063358685256C40@webforums... > I have over 750 000 rows to retrieve from a table using a datawindow, but > my system can only handle approx 30 ...

I want to select top 3 rows except the first from 4 rows of a Table. It should select from top 2 row,top3 row and top4 row.
 Hi, Let say I've 4 rows in a table. I want to select top 3 rows except the first from 4 rows of a Table. It should select from top 2 row,top3 row and top4 row. Thanks in advance Asghar Ali Mohammed http://www.aliwebdev.com(Web Designer and Developer)Do not forget to "MARK AS ANSWER" on the post that helped you. If you can use Linq, you can use Skip. http://msdn.microsoft.com/en-us/vcsharp/aa336757.aspxThanks, EdMicrosoft MVP - ASP/ASP.NET Hii dear..U can fire the Query select Top(3) from Table1 order by id desc.. "A conclusion is whe...

Web resources about - Header separator row each 7th row. - asp.net.presentation-controls

Vapor–liquid separator - Wikipedia, the free encyclopedia
A vapor–liquid separator is a device used in several industrial applications to separate a vapor–liquid mixture . For the common variety, gravity ...

DIY vortex dust separator made from steel minikegs. - YouTube
This is my version of a vortex separator. It is constructed from two steel mini party kegs. It captures 90% of the dirt before it gets to the ...

OREO Separator Machine #4 — Creator: Robotic Butler HERB - YouTube
Finally a robot we can all relate to. This little guy's name is HERB, and he lives at Carnegie Mellon University, where he's been taught to separate ...

The Oreo cream separator
Wieden + Kennedy masters the art of creating hilarious fictional characters. After Mustafa for Old Spice and the guy with the brown speedo for ...

Gulping Yolkfish Egg Separator
From the website: •••••••••••••••••••••••• • Squeeze the fish • Gently bring its lips to the yolk • Release to swallow the yolk • Squeeze again ...

Underscores are now word separators, proclaims Google
Head of Google's webspam team, Matt Cutts, shared some meaty tips on SEO to WordPress bloggers at WordCamp 2007 this weekend. Read this article ...

Tommy Hawes' Crack Egg Separator
... omelette, I know he gets pissed. Those of you who have separated an egg the old-fashioned-way know why. What Antonio needs is an egg separator, ...

DNews: Meet the Man Behind the Oreo Separator Machine!
David Neevel hates Oreo filling. So he built a machine to carefully remove all traces of the white fluff from the iconic cookie.

Cookie Hardliner Takes Serious Stance Against Creme, Builds “Oreo Separator”
As part of its cookies vs. creme campaign, Oreo has just released a video detailing one man’s complicated efforts to rid his Oreos of creme. ...

A Whisk And Egg-Yolk Separator In One
This bespoke whisk will separate your egg yolks from your whites and keep your hands clean. The cupcake is dead. Long live the cupcake? A couple ...

Resources last updated: 1/15/2016 2:36:53 PM