Special formatting of a GridView...

Please support our ASP.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Jun 2006
Posts: 3
Reputation: showtime is an unknown quantity at this point 
Solved Threads: 0
showtime showtime is offline Offline
Newbie Poster

Special formatting of a GridView...

 
0
  #1
Jan 3rd, 2007
SELECT Stores.strStoreName,
(CASE WHEN T.intItemID=S.MinSub THEN Stores.strLogo ELSE NULL END) AS displayCategory,
T.txtDescription
FROM Items AS T
INNER JOIN
Stores ON T.intStoreID = Stores.intStoreID,
( SELECT intStoreID , Min(intItemID ) AS MinSub
FROM Items
GROUP BY intStoreID ) AS S
WHERE T.intStoreID = S.intStoreID
ORDER BY T.intStoreID, T.intItemID


The SQL works, but I need to do some formatting within the datagrid but I am unsure of the best way...

<asp:GridView Width="100%" BorderWidth="0" CellPadding="0" CellSpacing="0" BorderColor="white"
AutoGenerateColumns="FALSE" ShowHeader="false" ID="gvStores" runat="server">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<table>
<tr>
<td valign=top width="110px">
<img border="0" src="images/<%# Eval("strLogo")%>" />
</td>
<td valign=top class="bluebodytext">
<%# Eval("txtDescription")%>
<i>Offer Expires <%# String.Format("{0:d}",Eval("dtmExpiration")) %></i>
</td>
</tr>
</table>
<div class="row">

</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

It display data like this

StoreImage 1 Item 1
Item 2
Item 3

StoreImage 2 Item 1
Item 3
What I need to do is insert an HR AFTER the StoreImage(n) like this



StoreImage 1 Item 1
Item 2
Item 3
_______________________
StoreImage 2 Item 1
Item 3

Is there any simple way I could accomplish this??

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC