473,774 Members | 2,275 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Very strange behavours in datagrid when setting EnableViewState =false

Hi, i'm using a datagrid control in my webform, with
AutoGenerateCol umns=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 PageIndexChange dEvent 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 1981
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
AutoGenerateCo lumns=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 PageIndexChange dEvent 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*******@disc ussions.microso ft.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
AutoGenerateCo lumns=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 PageIndexChange dEvent 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
1378
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 x) unsigned int y = 0x2 if (x&y) // FALSE
1
375
by: sultan zahir khan | last post by:
check the default viewstate settings of these controls
5
14776
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 postback occurs. Why is this? I want the textbox to become empty after postback. How can I do it without setting textbox.text = "" and without doing Response.redirect to the same page. JK
4
3127
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 enableViewState is also false -- still, not working. After doing al these, I still see the hidden viewstate variable in the HTML source. Please help!!!!!!!! Thanks!
6
1935
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 auto post back which reloads the page. I run the web application and type "test 1" into Textbox1 and "test 2" into Textbox2. I click the button and the page reloads. Textbox1 has the value of "test 1". Textbox2 has the value of "test 2". Am...
2
2915
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
2063
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 advance. Regards,
0
879
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 event (right?). Using viewstate (no matter where) to rebuild the gridview is no option since the gridview may contain many rows. I then have to get the newly requested data - two expensive trips to the database, one of them not necessary in my...
0
9621
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8937
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.