On Fri, 14 Oct 2005 09:20:42 -0700, Bruce Barker wrote:
they probably did not not use a repeater, but just generated the table
directly, its faily trival.
-- bruce (sqlwork.com)
"Stimp" <re*@spumco.com> wrote in message
news:sl****************@carbon.redbrick.dcu.ie...I would like to produce something like:
http://redwoodestates.co.uk/forrent.aspx
It's either a datalist/repeater/datagrid, but it is broken up into
sections ("1 bedroom", "2 bedroom", etc...)
My experience with datalists is that you can have a <SeparatorTemplate>
between each row, but how do they manage to separate rows at random
intervals?
Are they using a <repeater> within each datalist <itemtemplate>
or something similar?
Thanks.
--
"I hear ma train a comin'
... hear freedom comin"
I use nested repeaters in master/detail configuration. The inner repeater
(detail) is data bound in the master repeater's onItemDataBound event.
(i.e.: a MasterRowAvailableHandler))
Mine is:
protected void MasterRowAvailableHandler(Object sender,
RepeaterItemEventArgs e){
try{
if(e.Item.ItemType == ListeItemType.Item || e.Item.ItempType ==
ListItemType.AlternatingItem){
((Repeater)e.Item.FindControl("DetailRepeater")).D ataSource =
((DataRowViw)e.Item.DataItem).CreateChildView("Mas terDetailRelation");
((Repeater)e.Item.FindControl("DetailRepeater")).D ataBind();
}
etc. (exception handling)
The "MasterDetailRelation" is a DataRelation between the master and detail
tables as for example:
DataRelation rel = new DataRelation("MasterDetailRelation",
ds.Tables("Master").Columns["CommonColumn"],ds.Tables("Detail").Columns["CommonColumn"]);
ds.Relations.Add(rel).
//ds is the DataSet containing the two tables.
I hope this helps