473,485 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Copy Datagrid via Session-var

Hi i have a Webapplication with different Pages and on each Page I
have a Datagrid(Paged) and a Print-Button.

When clicking on the Button a new Window PopsUp and a 1:1 Copy of my
aktually seen Datagrid(without paging, the whole data) should be
displayed there.

This works fine with if i store my dataset in a Session Variable and
on my Print-Page I assign the Sessionvariable to the
DataGrid1.DataSource and then i DataGrid1.DataBind() it.

Ok but my Problem is, that if I do it this way, I lose the format of
each Column/Row.

So I tried to store the whole datagrid in a Session Variable an then
only assign the Variable to the new Datagrid, but now the Datagrid
won't even be displayed.
Is there a way to get only the Format of a datagrid an reassign it, or
even better can someone tell me how to copy and reassign the whole
Datagrid?

Hope someone can help me

Matthias
Nov 19 '05 #1
0 956

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

Similar topics

12
2842
by: James Norton-Jones | last post by:
Hi, Am I trying to hold the data of a DataGrid in a label so that when the form is reposted the DataGrid can be repopulated. The problem I am having is that I don't understand how to get the...
1
3416
by: Michelle Stone | last post by:
Hi all. I have an empty datagrid on my web form. And I add BoundDataColumn(s) to it through code. But after each postback, the columns and rows disappear. As a workabout, I tried to rebind the...
1
4275
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
1
3257
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
1
2330
by: Jeremy | last post by:
I want my gird to sort only the items on the current page when I click on a column header. I wrote a little test app, but when I sort it pulls in items from other pages and places them on the current...
1
2258
by: Lee Price | last post by:
Hi all, I have a bound datagrid which is filled with data and displayed.Now on the click of a button I need to refill the datagrid with new data but the problem is the datagrid mixes up the new...
3
2769
by: CVerma | last post by:
Hi, I have an embedded datagrid within a datalist. I am not able to perfrom paging in the datagrid. Any ideas? Here is my code: Here is my Simplegrid.cs file: using System; using...
2
1485
by: Joao Dias | last post by:
Hi, I am almost new here and a newbie in ASP.NET and .NET in general. How can I make just that ? I have tried at least 5 different ways of doing that and I just can't: I have a data-bound...
0
2055
by: rupalirane07 | last post by:
Both grids displays fine. But the problem is only parent datagrid sorting works fine but when i clik on child datagrid for sorting it gives me error: NullReferenceException error Any...
8
3050
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
6960
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
7161
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...
1
6825
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
5418
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,...
1
4857
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...
0
3058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3063
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1376
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
247
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.