473,414 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

need page break after inserting dynamic datagrids

I am displaying a summary and groups of data all from one tablein a database.

First I display summary information (where categoryID = 0) in adatagrid. When it goes into the datagrid_itemdatabind, I lookat the itemID and select everything from the database related tothat item - this is where i dyanamically create another datagridto display the group information for that item. Then I add thenewly created datagrid to a panel. This all works fine, but forprinting, I want to display one datagrid per page. Does anyoneknow how to do that? Or if this is not the best way to go aboutit, any tips would be appreciated!

Here is some code:

If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType =ListItemType.AlternatingItem Then

Dim dg As New DataGrid

Dim dv As DataView = testcaseSubDT.DefaultView

Dim categoryID As Integer = CInt(e.Item.Cells(0).Text)

dv.RowFilter = "itemID=" & categoryID

dg.DataSource = dv

dg.DataBind()

Dim separator As New Label

'When printing, try to put a page break -- THIS DOESN'T WORK

separator.Text = "<hr><p STYLE='page-break-before: always'></p>"& caseDesc

pnlReport.Controls.Add(separator)

pnlReport.Controls.Add(dg)

Also note: If I try to put the <p Style> anywhere in my HTML itdoesn't work
I've also tried setting a Style tag in the head area @div withthat style, but it doesn't seem to work either.

--------------------------------
From: mcgirk

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>CDhzNo6wvkKAmnSLvQ58Kg==</Id>
Nov 21 '05 #1
0 905

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Richard Hollenbeck | last post by:
Hello Newsgroup. You have all been very helpful in the past and I thank you. I try to ask relevant questions so that they don't just benefit me, but also benefit the group. I'm currently...
12
by: Jim H | last post by:
We ahve a .NET web page that we dynamically create a bunch of DataGrids and add them to a place holder. When the user hits submit we need to go through all of the DataGrids to get some data. We...
6
by: mark | last post by:
im trying to split prints out by using <STYLE>P { PAGE-BREAK-AFTER: always }</STYLE> in the <HEAD> </HEAD> section however its not page breaking like i would like - i want it to page break...
6
by: Glenn Owens | last post by:
I have an ASP.Net page on which there are serveral static controls (listboxes, radiobuttonlist and textboxes). These controls are used to create criteria from which the code-behind will dynamically...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
16
by: matt | last post by:
hello, ive been trying to figure something out, largely thru trial & error. thought perhaps someone else may have knowledge. i have an html table that consists of blocks of related data --...
1
by: Erik K. Schindeldecker | last post by:
Good Afternoon, I am exporting a series of datagrids to Microsoft Word, and cannot figure out how to force a page break between each datagrid. Does anyone know of a character or command I could...
1
by: dabbakal | last post by:
Hello, am a new member and this is my first posting. C++ is the first progrsaming language am taking and is just for 3 months. Having benefited from lot of posting i decided to join. But currently...
4
by: svgeorge | last post by:
I NEED TO COLLECT FROM THE GRIDVIEW(DATASELECTED) IN TO A TABLE(SelectedPayment) -------------------------------------------------------------------------------- How TO COLLECT THE ROWS...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.