473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Datagrid EnableViewState problem

Hi everyone,
I have a datagrid to display search results. The search results at this
stage we only return the first 500 records to speed up the search. The
problem is, if I turn the EnableViewState on, the search regularly failed
with a message that says tempdb is full... It does not however happens all
the time. I have tried to turn the EnableViewState off, that seems to do the
trick but causes another problem, the datagrid's paging does not work for
hidden pages (example, we only 5 pages, numbered 1, 2,.., 5 with the rest can
be accessed by clicking the ... after the 5. After clicking the ... after the
5, the numbers 6 - 10 are displayed but if I click on any number from 7 to
10, it goes back to pages 1 - 5). HELP!!!!
Is there a size limit to the contents that can be displayed on an IE6 browser?
Has anyone experienced the same problem or is it just me?
Reducing the number of records returned is an alternative but it would be
much better if someone has a work around.
Any suggestion is greatly appreciated.
Calvin
Jan 12 '06 #1
2 3073
Hello,

Disable viewstate for each row after binding the data. Paging works without it

BindTheData();
foreach (DataGridItem item in dg.Items)
{
item.EnableViewState = false;
}
--
Milosz Skalecki
MCP, MCAD
"Calvin KD" wrote:
Hi everyone,
I have a datagrid to display search results. The search results at this
stage we only return the first 500 records to speed up the search. The
problem is, if I turn the EnableViewState on, the search regularly failed
with a message that says tempdb is full... It does not however happens all
the time. I have tried to turn the EnableViewState off, that seems to do the
trick but causes another problem, the datagrid's paging does not work for
hidden pages (example, we only 5 pages, numbered 1, 2,.., 5 with the rest can
be accessed by clicking the ... after the 5. After clicking the ... after the
5, the numbers 6 - 10 are displayed but if I click on any number from 7 to
10, it goes back to pages 1 - 5). HELP!!!!
Is there a size limit to the contents that can be displayed on an IE6 browser?
Has anyone experienced the same problem or is it just me?
Reducing the number of records returned is an alternative but it would be
much better if someone has a work around.
Any suggestion is greatly appreciated.
Calvin

Jan 12 '06 #2
Thanks so much Milosz. It worked like a charm.
Cheers.
Calvin

"Milosz Skalecki" wrote:
Hello,

Disable viewstate for each row after binding the data. Paging works without it

BindTheData();
foreach (DataGridItem item in dg.Items)
{
item.EnableViewState = false;
}
--
Milosz Skalecki
MCP, MCAD
"Calvin KD" wrote:
Hi everyone,
I have a datagrid to display search results. The search results at this
stage we only return the first 500 records to speed up the search. The
problem is, if I turn the EnableViewState on, the search regularly failed
with a message that says tempdb is full... It does not however happens all
the time. I have tried to turn the EnableViewState off, that seems to do the
trick but causes another problem, the datagrid's paging does not work for
hidden pages (example, we only 5 pages, numbered 1, 2,.., 5 with the rest can
be accessed by clicking the ... after the 5. After clicking the ... after the
5, the numbers 6 - 10 are displayed but if I click on any number from 7 to
10, it goes back to pages 1 - 5). HELP!!!!
Is there a size limit to the contents that can be displayed on an IE6 browser?
Has anyone experienced the same problem or is it just me?
Reducing the number of records returned is an alternative but it would be
much better if someone has a work around.
Any suggestion is greatly appreciated.
Calvin

Jan 18 '06 #3

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

Similar topics

0
by: Andla Rand | last post by:
Hi, Could you help me to understand how datagrid works. I'm trying to make a datagrid editable. Now most of the tutorials I read says that i should turn the Enable ViewState off. Why is that? ...
7
by: A.M | last post by:
Hi, I want to refresh my DataGrid data on every postback. I have following code in Page_Load event, but after first page load, the DataGrid never gets refresh. Here is the code i have in...
2
by: Syed Sami R. Shah | last post by:
hi all, i am having problem with using itemcommand of datagrid by way of asp:image button. i have put an image button in a datagrid item template and have set CommandName="DeleteRecord" and have...
6
by: sonic | last post by:
Hi, I am experimenting with different viewstate management ideas for large datagrids, and found a microsoft suggestion to turn it off, and only store relevant information by manually accessing...
3
by: Mortar | last post by:
i would like my datagrids to be both sortable and pageable. All the examples i have found so far use methods which require the datagrid's enableViewState method set to true. This can be bad if the...
0
by: Sue | last post by:
I'm missing something very simple here, and I need an answer fairly quick if possible. I'm behind on this project now because of this... Code examples below question... I have a datagrid (DG)...
5
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
0
by: jigsawcube1 | last post by:
I am trying to accept two input strings and concatinate and display the result in a datagrid. Following is the HTML and code. ItemCommand does not get fired what is that I am missing? <body...
6
by: slinky | last post by:
I found the following code to transfer datagrid data to an Excel file. Is this written in C#?... I'm a vb.netter. I'm just not sure where to place the code to experiment on it. Should I place it in...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.