Ask a Question related to ASP.NET General, Design and Development.
-
Stan #1
How can I make a header column span?
I would like my header column span multiple columns, for example:
Date
Ready Open Close
---------------------------
08/06 10 am 5pm
How can I do that?
Thanks,
-Stan
Stan Guest
-
Two column header rows possible?
We are currently creating output displaying 'Total' and 'Avg' information. Is it possible to add a row above, spanning multiple columns similar to... -
DataGrid (body only) contained in <span>...</span> tags
Hi, I have a DataGrid control that displays many records. As such, I have been given a requirement to contain only the body of my DataGrid... -
Column Header
I have a web form with a datagrid. The datagrid has 5 columns. In design mode each column has header text. I defined the header text, data source,... -
Image in header column (not replacing column header text)
I have a sortable (asc/desc) datagrid and would like to add a small arrow icon (down/up) next to the column header text to improve the UI. Is this... -
Button in column header
I want to put a button in a column header. How do I handle the event when the button is clicked? -
ElmoWatson #2
Re: How can I make a header column span?
Are we talking about a DataGrid, or another server control, maybe , or a
basic HTML table, (or what)?
David Wier
[url]http://aspnet101.com[/url]
[url]http://aspexpress.com[/url]
"Stan" <nospam@yahoo.com> wrote in message
news:eyJ8U8CXDHA.3924@tk2msftngp13.phx.gbl...> I would like my header column span multiple columns, for example:
>
> Date
> Ready Open Close
> ---------------------------
> 08/06 10 am 5pm
>
> How can I do that?
>
> Thanks,
>
> -Stan
>
>
ElmoWatson Guest
-
Stan #3
Re: How can I make a header column span?
DataGrid
"ElmoWatson" <sputnik75043@yahoo.com> wrote in message
news:OecuHADXDHA.2464@TK2MSFTNGP09.phx.gbl...> Are we talking about a DataGrid, or another server control, maybe , or a
> basic HTML table, (or what)?
>
>
> David Wier
> [url]http://aspnet101.com[/url]
> [url]http://aspexpress.com[/url]
>
>
> "Stan" <nospam@yahoo.com> wrote in message
> news:eyJ8U8CXDHA.3924@tk2msftngp13.phx.gbl...>> > I would like my header column span multiple columns, for example:
> >
> > Date
> > Ready Open Close
> > ---------------------------
> > 08/06 10 am 5pm
> >
> > How can I do that?
> >
> > Thanks,
> >
> > -Stan
> >
> >
>
Stan Guest
-
Parker Zhang [MSFT] #4
RE: How can I make a header column span?
Hello,
How about nesting a datagrid in a template column of another datagrid?
HTH,
--
Parker Zhang
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Parker Zhang [MSFT] Guest
-
Stan #5
Re: How can I make a header column span?
Hmm...
Not sure I understood that...
The problem is that neither <asp:boundcolumn> no <asp:templatecolumn>
provide a way
of splitting a header colum:
Store ! Time
---- ----------------------------
! Open ! Close
---------------------------------
ABC 10 9
XYZ 11 5
Seems like it is impossible to do in datagrid...
"Parker Zhang [MSFT]" <parzhang@online.microsoft.com> wrote in message
news:kiOqeMWXDHA.2544@cpmsftngxa06.phx.gbl...rights.> Hello,
>
> How about nesting a datagrid in a template column of another datagrid?
>
> HTH,
>
> --
> Parker Zhang
> Microsoft Developer Support
>
> This posting is provided "AS IS" with no warranties, and confers no>
Stan Guest
-
Parker Zhang [MSFT] #6
Re: How can I make a header column span?
Hello,
Please have a look at the following code. It will clarify my post. I know
it is not the best anwser. but at least it works.
<asp:DataGrid id="DataGrid1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateColumn HeaderText="Store">
<ItemTemplate>
<asp:DataGrid id=DataGrid2 runat="server" DataSource="<%#
MyDataSet1 %>" DataMember="YourTableName" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="Store"
SortExpression="Store"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Time">
<ItemTemplate>
<asp:DataGrid id=DataGrid3 runat="server" DataSource="<%#
MyDataSet1 %>" DataMember="YourTableName" AutoGenerateColumns="False">
<Columns>
<asp:BoundColumn DataField="Open"
SortExpression="Open" HeaderText="CompanyName"></asp:BoundColumn>
<asp:BoundColumn DataField="Close"
SortExpression="Close" HeaderText="ContactName"></asp:BoundColumn>
</Columns>
</asp:DataGrid>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
SqlDataAdapter1.Fill(MyDataSet1)
Dim values As ArrayList = New ArrayList()
values.Add(0)
DataGrid1.DataSource = values
DataGrid1.DataBind()
End Sub
Private Sub DataGrid1_ItemDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DataGridItemEventArgs) Handles
DataGrid1.ItemDataBound
Dim dg As DataGrid
dg = e.Item.FindControl("DataGrid2")
If Not dg Is Nothing Then
dg.DataBind()
End If
dg = e.Item.FindControl("DataGrid3")
If Not dg Is Nothing Then
dg.DataBind()
End If
End Sub
--
Parker Zhang
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Parker Zhang [MSFT] Guest



Reply With Quote

