Printing one item of a DataList?

A

Allen Davis

I have some hierarchical data bound to a series of nested DataLists and
DataGrids for which I'd like to be able to provide the end-user some
targeted printing capabilities. By that I mean being able to send just one
parent dataitem and all its children to the printer. Does anyone have any
good suggestions for how to do this or where to look for ideas about how to
accomplish it?

Thanks
 
S

Steven Cheng[MSFT]

Hi Allen,

Thank you for using Microsoft NewsGroup Service. Based on your description,
you've some asp.net web pages which contains Some Data Reports. The reports
consist of DataList which also has several DataGrid in each RowTemplate.
Since when printing the report, you want to let the customer specify one of
the DataGrid in DataList to be printed? Please correct me if my
understanding of your problem is not quite correct.


Generally, in a web page, if the client side want to print a page, it'll
cause the whole page to be printed out. The print operation is page based.
As for your situation, you want part of a page or part of a WebControl's
Items to be printed out. Would you consider the following suggestion:

1.If the DataItems(Those Grids in the DataList) 's structure is not very
complex, you may try hidden the other Items, Grids the customer want to
print a certain one of them. Many Serverside controls can set its display
status via seting the "Visible" property.

2.If the page structure is so complex that not convenient to implement the
1 step, I think you may consider display the certain DataGrid or Item into
another new page, then let the customer print that single page only with
the Data he specified.

If you have any questions on it or my suggestion not quite suitable for
your situation, please feel free to let me know.


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
A

Allen Davis

Thanks Steven. Good suggestions. And you're right, the data structure is not
that complex. I only have one grandparent DataList holding one parent
DataList with one child DataGrid that display read-only data pulled in from
an Access database with a very similar structure.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top