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.i e...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 <SeparatorTempl ate>
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 MasterRowAvaila bleHandler))
Mine is:
protected void MasterRowAvaila bleHandler(Obje ct sender,
RepeaterItemEve ntArgs e){
try{
if(e.Item.ItemT ype == ListeItemType.I tem || e.Item.ItempTyp e ==
ListItemType.Al ternatingItem){
((Repeater)e.It em.FindControl( "DetailRepeater ")).DataSou rce =
((DataRowViw)e. Item.DataItem). CreateChildView ("MasterDetailR elation");
((Repeater)e.It em.FindControl( "DetailRepeater ")).DataBin d();
}
etc. (exception handling)
The "MasterDetailRe lation" is a DataRelation between the master and detail
tables as for example:
DataRelation rel = new DataRelation("M asterDetailRela tion",
ds.Tables("Mast er").Columns["CommonColu mn"],ds.Tables("Det ail").Columns["CommonColu mn"]);
ds.Relations.Ad d(rel).
//ds is the DataSet containing the two tables.
I hope this helps