Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > table web control

Reply
Thread Tools

table web control

 
 
-D-
Guest
Posts: n/a
 
      11-04-2004
I'm pretty new to using asp.net, so please forgive my novice question. I
hope I clearly explain myself.

I'm trying to do the following with a table web control. I want to have a
table with headers that are sortable for each column and then another row
where the fields from a database will be populated....say 4 columns.

I want to repeat the table row where the data is populated. So, a new row
will be dynamically generated for every row in the database table that I'm
pulling data from.

The first table row where I have the headers remain static, but have the
capability to sort each column of data.

The other functionality I would like is to be able to click on a row
containing data and it will then display another table below that will hold
all the fields for that particular record. So, the funtionality would have
the ability to click a row and show another table kind of like a show/hide
region in ASP and display all the fields in the database table for the
corresponding record that was clicked in the top table.

I hope I explained that clearly. How could I achieve this? Would I program
this in the code behind? I'm using C#.

This is the basic idea I was working with:

<asp:Table id="Table1"
BackImageUrl="url"
CellSpacing="cellspacing"
CellPadding="cellpadding"
GridLines="None|Horizontal|Vertical|Both"
HorizontalAlign="Center|Justify|Left|NotSet|Right"
runat="server">
<asp:TableRow>
<asp:TableCell>Header1</asp:TableCell>
<asp:TableCell>Header2</asp:TableCell>
<asp:TableCell>Header3</asp:TableCell>
<asp:TableCell>Header4</asp:TableCell>
</asp:TableRow>
<asp:TableRow>
<asp:TableCell>Field1</asp:TableCell>
<asp:TableCell>Field2</asp:TableCell>
<asp:TableCell>Field3</asp:TableCell>
<asp:TableCell>Field4</asp:TableCell>
</asp:TableRow>
</asp:Table>


<asp:Table id="Table2" (gets displayed when a row in table1 is clicked)
BackImageUrl="url"
CellSpacing="cellspacing"
CellPadding="cellpadding"
GridLines="None|Horizontal|Vertical|Both"
HorizontalAlign="Center|Justify|Left|NotSet|Right"
runat="server">
<asp:TableRow>
<asp:TableCell>blahblah</asp:TableCell>
<asp:TableCell>etc.</asp:TableCell>
</asp:TableRow>
</asp:Table>

Any help is greatly appreciated. Thank you.
-D-


 
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
html table control vs web table control Geary ASP .Net 2 07-12-2007 12:12 AM
add hyber link to table or table cell web control Symphony ASP .Net Web Controls 1 03-16-2005 12:30 AM
Table/table rows/table data tag question? Rio HTML 4 11-05-2004 08:11 AM
Could not load type VTFixup Table from assembly Invalid token in v-table fix-up table. David Williams ASP .Net 2 08-12-2003 07:55 AM
Using Table control in a custom composite control. Control does not render properly in design time. jb_in_marietta@yahoo.com ASP .Net 0 07-01-2003 09:26 PM



Advertisments