|
-
Oct 9th, 2003, 08:59 AM
#1
Datagrid footer...
I have a datagrid that has the footer showing. The problem I have is that the footer is actually a footer for each column, so the column separators are showing.
What I would like is just something to pad the empty space I have after the last row in the grid.
If it was normal HTML, I would just insert another row in the table with a colspan of how ever many columns I had, and a height of 100%.
How would I do the same thing with a datagrid?
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Oct 9th, 2003, 05:09 PM
#2
In the databind event for the datagrid, test for e.itemtype being a footer.
Then, programmatically remove the cells and then change the column span of the first cell to span all of your columns.
What's even better is I'll show you how!
PHP Code:
if e.item.ItemType = ListItemType.Footer then
Dim numberofCells as Integer = e.Item.Cells.Count
Dim x as Integer
For x = 0 to numberOfCells - 2
e.Item.Cells.removeAt(0)
Next
e.Item.Cells(0).Text = "your text here" 'use if you have no text
e.Item.Cells(0).ColumnSpan = numberOfCells
e.Item.Cells(0).HorizontalAlign = HorizontalAlign.Left
e.Item.Cells(0).Attributes.Add("height","100%")
Last edited by Lord_Rat; Oct 9th, 2003 at 05:31 PM.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
Oct 9th, 2003, 05:39 PM
#3
Thanks, I'll give it a shot.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|