Help with ROWSPAN in table/grid form display

S

simon

hello,
relatively new to .net, i'm using vb.net and the 2.0 .net platform

I'm trying to display a grid that has a text box on the left in one
cell (with a hidden ID), which will be associated to multiple rows
(events) on the right. each row on the right will also have a text
box

-------------------------------------------------------
[ ] event 1
[ ] [ ] event 2
[ ] event 3
-------------------------------------------------------
[ ] event 4
[ ] [ ] event 5

-------------------------------------------------------

the user is able to rate the "outer" value which will be passed to the
inner values, or they can ignore the outer value and individually rate
the inner value
the other caveat is that not all events are 3-to-1, some may be 2 some
may be 1.
I have in the DB the associations between the events and the
"grouping", a column on each row will have an ID (unique per grouping,
not unique values in the column) so that information as well as a sum
for how many rows are within that grouping.

i've looked into a "grid within a grid" and the outer column can then
drive the population of the "child" rows to the right. a few problems
with this layout. 1) i needed the full data to come back as one
query, there are filtering capabilities that affect the whole display
and breaking this display into multiple queries to drive the inner and
outer grids will be problem some. 2) the title bar for the inner
grids will show for each grouping, wanted to have just one title bar
for the whole page.

i've also looked (recently found) the repeater capability. this is
more inline with what i'm looking for, as you can have one query and
define all the html-table code yourself.

there is a great tutorial here
http://msconline.maconstate.edu/tutorials/ASPNET1/ASPNET08/aspnet08-01.aspx

and under that page there is a section "Styling Table Templates" that
looks mostly like what i'm looking for. but there the outer rowspan
is always at 3, mine would be variable


<asp:Repeater id="ProductsTable" runat="server">
<HeaderTemplate>
<table border="1" cellpadding="3"style="border-collapse:collapse">
<tr style="background-color:#F0F0F0">
<th>Picture</th>
<th>Item Information</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td rowspan="3">
<img src="<%# Container.DataItem("ItemNo") %>.jpg"/>
</td>
<td><%# Container.DataItem("ItemNo") %></td>
</tr>
<tr>
<td><%# Container.DataItem("ItemName") %></td>
</tr>
<tr>
<td><%# Container.DataItem("ItemPrice") %></td>
</tr>
</ItemTemplate>
<FooterTemplate>
<tr>
<td colspan="2" style="font-size:10pt">
<i>Source: Products.xml file</i>
</td>
</tr>
</table>
</FooterTemplate>
</asp:Repeater>


i'm assuming i can make the rowspan dynamic with the value being
pulled from the DB and i'm trying to get this to work now.

i'm hoping someone can give me some suggestions on how to handle this
whole display (datagrid, repeater, etc). i need the codebehind to be
able to work with the aspx so that i can process the entries provided
by the users. so in that regard, i don't think i can gen the html
table/form myself (with response write) as then the codebehind would
have access to the elements

any help would truly be appreciated.
thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top