Printing one item of a DataList?

  • Thread starter Thread starter Allen Davis
  • Start date Start date
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
 
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.)
 
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.
 
Back
Top