By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,933 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,933 IT Pros & Developers. It's quick & easy.

Unexpected datagrid behavior

P: n/a
I am writing a control that prints any datagrid. 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

Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.