473,405 Members | 2,354 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,405 software developers and data experts.

Very strange behavours in datagrid when setting EnableViewState=false

Hi, i'm using a datagrid control in my webform, with
AutoGenerateColumns=false; it work very well if EnableViewState=true;
including paging and sorting, but this cause a big performance issue, so
i've decided to set EnableViewState=false:
now the events related to the datagrid have some strange behavours: for
example the PageIndexChangedEvent is not correcty raised (when i go from
page 1 to 4 works, if i want to return to page 1, the event is not longer
raised)
Please help me
Thanks,
Mik
Nov 18 '05 #1
2 1964
Are you re-databinding these controls on each load?

Also, keep in mind control events are raised after
page_load but before pre-render. If you have something
funky going on if pageindex is 1 in page_load, that may
affect the event firing or not.

If it doesnt fire at all ever, its probably that vs.net
lost event binding (its notorious for doing so)

Weston

-----Original Message-----
Hi, i'm using a datagrid control in my webform, with
AutoGenerateColumns=false; it work very well if EnableViewState=true;including paging and sorting, but this cause a big performance issue, soi've decided to set EnableViewState=false:
now the events related to the datagrid have some strange behavours: forexample the PageIndexChangedEvent is not correcty raised (when i go frompage 1 to 4 works, if i want to return to page 1, the event is not longerraised)
Please help me
Thanks,
Mik
.

Nov 18 '05 #2
Yes, i'm re-databinding the control on each Page_Load event... the only
change i've made is to set EnableViewState=false
what does mean "vs.net lost event binding"????
Thanks

"Weston Weems" <an*******@discussions.microsoft.com> ha scritto nel
messaggio news:0b****************************@phx.gbl...
Are you re-databinding these controls on each load?

Also, keep in mind control events are raised after
page_load but before pre-render. If you have something
funky going on if pageindex is 1 in page_load, that may
affect the event firing or not.

If it doesnt fire at all ever, its probably that vs.net
lost event binding (its notorious for doing so)

Weston

-----Original Message-----
Hi, i'm using a datagrid control in my webform, with
AutoGenerateColumns=false; it work very well if

EnableViewState=true;
including paging and sorting, but this cause a big

performance issue, so
i've decided to set EnableViewState=false:
now the events related to the datagrid have some strange

behavours: for
example the PageIndexChangedEvent is not correcty raised

(when i go from
page 1 to 4 works, if i want to return to page 1, the

event is not longer
raised)
Please help me
Thanks,
Mik
.

Nov 18 '05 #3

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

Similar topics

9
by: Honus | last post by:
In a .Net application, given a C++ dll with methods called by a C# GUI Assume (x&y) is FALS the following code in the C++ dll, when called from the C# interface bool theMethod(unsigned int...
1
by: sultan zahir khan | last post by:
check the default viewstate settings of these controls
5
by: JollyK | last post by:
Hello all, I have always been having this issue and wondering what the solution is. When I set the enableviewstate property to false for a textbox, the textbox always retains its value after a...
4
by: Bruce Chao | last post by:
I tried to turn off viewstate and so I added enableViewState=false in side the Page directive, rebuild the page, test it. - not working Then I set all controls on the page so all their...
6
by: Chris | last post by:
I've created two textboxes and one button on my web form. I then set the EnableViewState property of Textbox1 to False. Textbox2 is set to True. The button has no code in it - It simply has an...
2
by: teo | last post by:
I have a Listbox, if I set EnableViewStarte = False the AutopostaBack fired by SelectedIndexChanged doesn't work. The 'SelectedIndexChanged' event should call
1
by: =?Utf-8?B?VmlkZHM=?= | last post by:
Hi All, I am not able to get the sort event when i EnableViewState =false for data grid. Is there any relation betwn those two.Please comment. How can I get through this problem? Thanks in...
0
by: DC | last post by:
Hi, I want to present hirarchical data in a gridview. Each row offers a link to another data subset. When viewstate is off, I have to early rebuild the gridview just to raise the damn click...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
0
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
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,...
0
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...

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.