unexpected datagrid behavior

G

G Dean Blake

I am writing a control that prints any datagrid using Crystal reports. My
control gets passed a datagrid object and examines it, formats, and prints
it. I am, however, encountering what I consider unexpected behavior of the
grid....

The grid is named dgBudgets.

In the page Load event I fill the dataset and bind dgBudgets.
I store dgBudgets in Session("myGrid").

In response to the click event of the PrintMe button I pass
Session("myGrid") to my control and call the print method. When doing this,
every thing works great.

But, if I pass dgBudgets to my control instead of Session("myGrid"),
everything prints except that right aligned horizontal column alignments are
notSet and non-visible columns are visible - everything else prints ok.

So, it seems that on the response back, when the printMe button is hit,
dgBudgets loses some of its attributes (although it is still visibly
correct). My understanding is that the initializeComponent code on the
response back should completely reconstruct the grid.

Why does dgBudgets lose its alignment and non-visible settings and nothing
else?

Thanks,
G
 

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
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top