ASP.NET Add Sub Header Row (Group) To GridView Control

    ''' <summary>
    ''' Insert a sub header in a grid view.
    ''' </summary>
    ''' <param name="gv">The GridView to insert the sub header row into.</param>
    ''' <param name="gvrBeforeRow">The GridViewRow to insert the sub header before.</param>
    ''' <param name="sSubHeaderText">The text to render in the sub header.</param>
    ''' <remarks></remarks>
    Protected Sub insertGroupHeaderToGridView(ByRef gv As GridView, ByVal gvrBeforeRow As GridViewRow, ByVal sSubHeaderText As String)
 
        Dim visibleColumns As Integer = gv.Columns.Count
 
        Dim tbl As Table = gv.Controls(0)
        Dim newRowIndex As Integer = tbl.Rows.GetRowIndex(gvrBeforeRow)
        Dim newRow As GridViewRow = New GridViewRow(newRowIndex, newRowIndex, DataControlRowType.DataRow, DataControlRowState.Normal)
 
        newRow.Cells.Add(New TableCell())
 
        If (visibleColumns > 1) Then
            newRow.Cells(0).ColumnSpan = visibleColumns
            newRow.Cells(0).Text = sSubHeaderText
        End If
 
        tbl.Controls.AddAt(newRowIndex, newRow)
 
    End Sub

Post Comment Now


How many bottles of beer are opened with a lighter in a given year?

The average number of bottles of beer opened with a lighter in a given year is _________ (worldwide). No Googling, no paper pen, just give me your best guess within the next minute or two.

I have asked this bit of trivia to dozens of friends and strangers as a mental math estimation exercise. The answer will obviously based on statistics and will have a margin of error. I have received a wide range of guesses from 7 to many billions. It seems people generally have great difficulty in approximation. And some completely lock up and are incapable of even guessing… and surprisingly (or perhaps not so), these are your typical smart guys… math teachers, programmers, engineers, etc.

Maybe this will spawn a whole new domain in IQ tests… Loose math approximation under time constraints. AKA “roughing it in”. Now that I think about it, Google asks these sorts of questions during interviews for a good reason(?).

For the record my guess is 310,000.

Here are a few guesses from my buds…

Sid K: 726,000
Edwin C: 4,000,000,000
Kenneth H: 1,000,000
David B: 480,000
Tina K: 1 Zillion Billion Quintillion
Keith B: 13,000,000
Kevin B: 7
Matt C: 3,257,823
Melissa K: 80,000,000,000
Derek D: 7
Brian E: 10,000,000

Stay tuned for the answer.

*I came up with this bit of trivia at the beach as some idiot tourist was trying to open his stupid glass beer bottle (thanks Corona) by tearing apart the arm rest of a beach rental chair.


Post Comment Now


Hands Across The Sand – Stop Oil Drilling In Florida

Hands Across The Sand is an organization committed to protecting our coastlines and waterways from near and off shore oil drilling. Join us February 13, 2010!

An organization devoted to protecting our coastlines and waterways from the devastating environmental effects of oil exploration and support industries.

Mission:

1. To raise awareness about pending Florida legislation to drill for oil within 3 to 10 miles of our coast

2. To organize a statewide, coastal movement to protest this legislation. This protest will bring thousands of Florida citizens to our beaches and will draw metaphorical and physical lines in the sand; human lines in the sand against near shore oil drilling in our waters. This event will be held on Saturday February 13, 2010

3. To convince our Legislators and Governor to drop any and all Legislation that would allow this folly.

Hands Across The Sand On Facebook


Post Comment Now


Droid On A Boat (high speed footage)

The following is the Motorola Droid running the Android OS version 2.0 uploaded directly from the phone to youtube. I know the footage is kinda bumpy but it show how well the camera/video records when conditions are “rough”.


Post Comment Now


Halo Domains For Sale (HaloStrategy.com, HaloStrategies.com, HaloTactic.com, HaloTactics.com)

Halo Domains For Sale (HloStrategy.com, HaloStrategies.com, HaloTactic.com, HaloTactics.com)

See this link.


Post Comment Now


Blog | Contact | Gallery | Links | Sandbox | Social Networking | Weather | Web Design


Copyright © 1997-2009 KCSH. All rights reserved.