Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > DataGrid, 7 columns on 2 rows?

Reply
Thread Tools

DataGrid, 7 columns on 2 rows?

 
 
Chris Podmore
Guest
Posts: n/a
 
      04-02-2004
Is this possible? I currently have a datagrid showing 7 columns, I would like to show the 6th and 7th columns on the next row. How can I do this?
 
Reply With Quote
 
 
 
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-03-2004
Hi Chris,

Based on my understanding, you want to do databinding to your datagrid
control, and wrap some columns to another row.

Actually, datagrid control did not expose such flexibility, but you still
can get what you want through Repeater control, do like this:

<asp:repeater id="Repeater1" runat="server">
<HeaderTemplate>
<table border="1" cellpadding="0" cellspacing="0">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem, "job_id")%></td>
<td><%#DataBinder.Eval(Container.DataItem, "min_lvl")%></td>
<td><%#DataBinder.Eval(Container.DataItem, "max_lvl")%></td>
</tr>
<tr>
<td><%#DataBinder.Eval(Container.DataItem, "job_description")%></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:repeater>

Please apply my suggestion to see if it works for you.

Thanks,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


 
Reply With Quote
 
 
 
 
Chris Podmore
Guest
Posts: n/a
 
      04-05-2004
Jeffrey,

Thanks for the reply. I will give it a try as soon as I can. I have had to move on to another part of the project for now but when I get a chance I will give your suggestion a try.

Chris.

----- Jeffrey Tan[MSFT] wrote: -----

Hi Chris,

Based on my understanding, you want to do databinding to your datagrid
control, and wrap some columns to another row.

Actually, datagrid control did not expose such flexibility, but you still
can get what you want through Repeater control, do like this:

<asp:repeater id="Repeater1" runat="server"><HeaderTemplate><table border="1" cellpadding="0" cellspacing="0"></HeaderTemplate><ItemTemplate><tr><td><%#DataBinder .Eval(Container.DataItem, "job_id")%></td><td><%#DataBinder.Eval(Container.DataItem, "min_lvl")%></td><td><%#DataBinder.Eval(Container.DataItem, "max_lvl")%></td></tr><tr><td><%#DataBinder.Eval(Container.DataItem, "job_description")%></td></tr></ItemTemplate><FooterTemplate></table></FooterTemplate></asp:repeater>

Please apply my suggestion to see if it works for you.

Thanks,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.



 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-05-2004
Hi Chris,

Thanks for your feedback.

Ok, once you have finished trying, please feel free to feedback. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
Chris Podmore
Guest
Posts: n/a
 
      04-08-2004
Jeffery

I haven't actually tried your suggestion, sorry. Since my original post I have purchased Infragistics NetAdvantage controls, not originally for their grid for some of their other controls. It's quite easy to implement what I was after using their webGrid control so I have gone for that.

Thanks again
Chris

----- "Jeffrey Tan[MSFT]" wrote: ----

Hi Chris

Thanks for your feedback.

Ok, once you have finished trying, please feel free to feedback. Thank

Best regards
Jeffrey Ta
Microsoft Online Partner Suppor
Get Secure! - www.microsoft.com/securit
This posting is provided "as is" with no warranties and confers no rights


 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      04-09-2004
Hi Chris,

I am glad you got what you want. If you need further help, please feel free
to feedback, I will help you. Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Align table columns with gridview columns Jacksm ASP .Net 2 11-21-2006 09:49 PM
Read CSV - string Columns - Int columns =?Utf-8?B?YmVub2l0?= ASP .Net 0 05-08-2006 02:11 PM
database columns vs. gui columns and sorting ittay.dror@gmail.com Java 5 03-04-2006 10:48 AM
CSS columns problem - faux columns don't work henrybranson@hotmail.com HTML 4 11-24-2005 10:05 AM
convert rows to columns and columns to rows helpful sql ASP .Net 0 05-19-2005 06:03 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57