How to make a datagrid column a row - DOTNET
This is a discussion on How to make a datagrid column a row - DOTNET ; How can I make a datagrid column into a single row that spans all the
other columns?
In this case I have a comment field that I want to make as wide as the
table but I cannot figure out ...
-
How to make a datagrid column a row
How can I make a datagrid column into a single row that spans all the
other columns?
In this case I have a comment field that I want to make as wide as the
table but I cannot figure out how to tell asp.net datagrid that I want
a new row.
I am using visual studio 2005,
Thanks to anybody who has tried this and has a solution
KB
-
Re: How to make a datagrid column a row
You may look at using a repeater with 2 rows in the itemtemplate. Something
like this:
<asp:repeater>
<headertemplate>
<table>
</headertemplate>
<itemtemplate>
<tr runat="server" id="trNormal">
<td>Databind expression for column 1</td>
<td>Databind expression for column 2</td>
<td>Databind expression for column 3</td>
</tr>
<tr runat="server" id="trComment">
<td columnspan=3>Databind expression for comment</td>
</tr>
</itemtemplate>
</asp:repeater>
<footertemplate>
</table>
</footertemplate>
and handle ItemDataBound event to hide trNormal or trComment as needed.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Ken B" <y2kbowen@gmail.com> wrote in message
news:1190695621.339369.96030@y42g2000hsy.googlegroups.com...
> How can I make a datagrid column into a single row that spans all the
> other columns?
> In this case I have a comment field that I want to make as wide as the
> table but I cannot figure out how to tell asp.net datagrid that I want
> a new row.
>
> I am using visual studio 2005,
>
> Thanks to anybody who has tried this and has a solution
>
> KB
>
-
Re: How to make a datagrid column a row
Hello Ken,
U need to handle RowDataBound event making changes to your rows there
see sample there http://dotnetjunkies.com/WebLog/josh...23/141038.aspx
---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
KB> How can I make a datagrid column into a single row that spans all
KB> the
KB> other columns?
KB> In this case I have a comment field that I want to make as wide as
KB> the
KB> table but I cannot figure out how to tell asp.net datagrid that I
KB> want
KB> a new row.
KB> I am using visual studio 2005,
KB>
KB> Thanks to anybody who has tried this and has a solution
KB>
KB> KB
KB>
Similar Threads
-
By Application Development in forum CSharp
Replies: 1
Last Post: 10-24-2007, 07:33 AM
-
By Application Development in forum DOTNET
Replies: 0
Last Post: 08-16-2006, 01:47 PM
-
By Application Development in forum Inetserver
Replies: 1
Last Post: 04-04-2006, 09:34 AM
-
By Application Development in forum XML SOAP
Replies: 0
Last Post: 02-28-2006, 10:52 PM
-
By Application Development in forum DOTNET
Replies: 0
Last Post: 01-24-2005, 07:05 AM