Datagrid's items are empty after Postback !!!

M

Maaty

I have a datagrid that represents a Shopping Cart content. I have a
checkbox and a quantity-textbox in each item. An update-button event is
assumed to retrieve the changes happened to both item's controls.
I had this module working probably for a long time. Once, and I don't
know how, the event code find the datagrid.items.count=zero, that's,
the datagrid can't be updated. However, the page returns with the
datagrid with its full binded data (Binding happened only when no
postback)

I have tried many things but no way. I got a backup code of that module
but also didn't work.
I ensured that the viewstate is enabled!!!!!!

Any help???

*The module implemented using C# codebehind
 
D

Daniel

I would help if i could understand the problem, it would be good if you
re-read your question and phrased it better.
 
M

Maaty

well, the problem, in a few words, that when I try to read the content
of my datagrid object during the postback, I find it has no items at
all. However, it keeps displaying its content after the postback.

finally , I found the solution. There's an article of Microsoft, says
that a similar case happens when the viewstate of the datgrid becomes
huge. The solution is to keep the viewstates of the needed
controls(inside the datagrid items) only.

Thank you Daniel for your concern.
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top