Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
saleek #1
extra datagrid header...
I was wondering if there is a way I can add an extra header to a datagrid?
I found this solution on the internet - but it seems quite old and didn't
work for me.
[url]http://www.dotnet247.com/247reference/msgs/13/69744.aspx[/url]
It recommends the following:
Private Sub DataGrid1_PreRender(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.PreRender
Dim dgitem As New DataGridItem(0, 0, ListItemType.Header)
Dim mycell As New TableCell
mycell.ColumnSpan = 1 'Set it to the colspan that you want
mycell.Text = "PRESS RADIO TV"
dgitem.Cells.Add(mycell)
DataGrid1.Controls(0).Controls.AddAt(0, dgitem)
End Sub
But I get an error:
Specified argument was out of the range of valid values. Parameter name:
index
I appreicate your help,
KS
saleek Guest
-
Adding extra rows to a DataGrid?
Hi everyone, I'm using a DataGrid to show records from a SQL query. The problem is, I'd really like to have two "extra" rows for every one... -
datagrid header
Is it possible to have an overall header that spans across all columns? An example would be a class schedule for student Ben. |Ben |English ... -
#25160 [NEW]: Extra characters in header under certain conditions
From: jeff at mos dot org Operating system: Windows 2000 PHP version: 4.3.2 PHP Bug Type: IIS related Bug description: ... -
DataGrid header and <TH>
Hello Vaclav, You might use the HeaderStyle of the DataGrid which will create Th on the client side. You can also attach style attribute to this... -
LWP Extra Header Lines
Hi, Does anyone know how to add extra request header lines with LWP? I've seen this way but thought I'd see if there's a 'better' way: my... -
Saravana #2
Re: extra datagrid header...
Check out this article,
[url]http://www.extremeexperts.com/Net/Articles/ExtendingDataGrid.aspx[/url]
--
-Saravana
[url]http://dotnetjunkies.com/WebLog/saravana/[/url]
[url]www.ExtremeExperts.com[/url]
"saleek" <saleek@discussions.microsoft.com> wrote in message
news:78193D06-BE43-4301-B0A0-0EC2A5FF87A1@microsoft.com...> I was wondering if there is a way I can add an extra header to a datagrid?
>
> I found this solution on the internet - but it seems quite old and didn't
> work for me.
>
> [url]http://www.dotnet247.com/247reference/msgs/13/69744.aspx[/url]
>
> It recommends the following:
>
> Private Sub DataGrid1_PreRender(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles DataGrid1.PreRender
> Dim dgitem As New DataGridItem(0, 0, ListItemType.Header)
> Dim mycell As New TableCell
> mycell.ColumnSpan = 1 'Set it to the colspan that you want
> mycell.Text = "PRESS RADIO TV"
> dgitem.Cells.Add(mycell)
> DataGrid1.Controls(0).Controls.AddAt(0, dgitem)
> End Sub
>
> But I get an error:
>
> Specified argument was out of the range of valid values. Parameter name:
> index
>
> I appreicate your help,
>
>
> KS
>
>
Saravana Guest



Reply With Quote

