Guest Will Posted August 19, 2004 Report Posted August 19, 2004 Hi all, it's probably a 'not possible' but i thought i'd ask I'm using the html repeater to display some results from a db query. I would like to break the printable page after 5 results by entering some javascript : >>>PAGE-BREAK-BEFORE: always but using the repeater i cannot work out how to either make it count back to the generating page, or count internally.?? does that make sense? Any pointers, even negative most appreciated. Will
Guest gadgetfbi Posted August 19, 2004 Report Posted August 19, 2004 Maybe I have you wrong, is this in a mobile web form - in which case it is not permitted as far as I understand. But as for aspx web forms, there is no paging function for the repeater control, is it a situation in which the datagrid could be used. It has some nice, expandable paging functions. [Edit] Come to think of it you could use a repeater, and page your datasource by splitting it some how, using some request parameter to indicate which 'page' of the data you wish to bind with. [/Edit] Rob
Guest Will Posted August 19, 2004 Report Posted August 19, 2004 Just cracked it .. the ItemCreated Event!! private void Repeater1_ItemCreated(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e) { if (incrimenter == 5){Label1.Text="<P CLASS='breakhere'>"; incrimenter=1;}else{Label1.Text="";incrimenter++;} ; }[/code] this actually worked, but it calls for all items including headers and footers. Thanks for the response tho.. Will
Guest woweezowee Posted August 20, 2004 Report Posted August 20, 2004 just add if( e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem ) { ... } this will skip the header, footer, seperator items
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now