473,385 Members | 1,707 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,385 software developers and data experts.

Event firing problem

Hi,

I have a datagrid, whose sort command event does not get fired first time
around. It takes 2 clicks to sort the grid.
This is the first time that I have encountered this problem. Any pointers on
why it is behaving this way?

Regards,
Piyush

Jul 21 '05 #1
3 1504
hi Piyush
Make sure your code for binding your datagrid is in if(! Page.IsPostBack)
"Piyush" wrote:
Hi,

I have a datagrid, whose sort command event does not get fired first time
around. It takes 2 clicks to sort the grid.
This is the first time that I have encountered this problem. Any pointers on
why it is behaving this way?

Regards,
Piyush

Jul 21 '05 #2
Hi,

I have a similar problem where event are not fired the first time. I have
two buttons and a datagrid on a form. The datagrid has a link button column
and the first click does not fire the event for the link button and the
buttons on the form. I can see that the page does postback except it does
not raise the event. Any idea why? And , data binding is done only if it is
not postback.

TinaD

"Hussein Zahran" wrote:
hi Piyush
Make sure your code for binding your datagrid is in if(! Page.IsPostBack)
"Piyush" wrote:
Hi,

I have a datagrid, whose sort command event does not get fired first time
around. It takes 2 clicks to sort the grid.
This is the first time that I have encountered this problem. Any pointers on
why it is behaving this way?

Regards,
Piyush

Jul 21 '05 #3
Hi,

I found the reason for my datagrid problem; it was an id I failed to set on
the page load of the user control. Moving the MyGrid.ID line below out side
of the if statement seems to correct my problem. And my other problem with
the regular buttons also solved.

If Not Page.IsPostBack Then
GetData()
BindGrid()
MyGrid.ID = "hgrid" 'this was the problem line
Else
GetHGridSession()
End If
Piyush, I hope you have resolved your problem by now, if not check for the
grid id value.
"TinaD" wrote:
Hi,

I have a similar problem where event are not fired the first time. I have
two buttons and a datagrid on a form. The datagrid has a link button column
and the first click does not fire the event for the link button and the
buttons on the form. I can see that the page does postback except it does
not raise the event. Any idea why? And , data binding is done only if it is
not postback.

TinaD

"Hussein Zahran" wrote:
hi Piyush
Make sure your code for binding your datagrid is in if(! Page.IsPostBack)
"Piyush" wrote:
Hi,

I have a datagrid, whose sort command event does not get fired first time
around. It takes 2 clicks to sort the grid.
This is the first time that I have encountered this problem. Any pointers on
why it is behaving this way?

Regards,
Piyush

Jul 21 '05 #4

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

Similar topics

2
by: Pete | last post by:
I have some funky form/event behavior. Access 97. Split frontend/backend, using Access security. I have the same behavior (or lack of behavior) for the pag_Click() event of two separate pages...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
5
by: Steve M | last post by:
Why are my sessions lasting so long? I have them set to 20 minute timeout in config file? The Session_End event is getting called an hour or more sometimes--well after the user has stopped...
2
by: David | last post by:
Hi all, I am dynamically creating a LinkButton in my datagrid, however, the event that I am creating for it is not firing. I am obviously missing something? What am I missing? Here is the...
5
by: Engineerik | last post by:
I have a login form which I want to display with the showdialog method. When I do that the event handler for the load event does not run. If I use the show method the load event handler runs...
3
by: Brett | last post by:
I'm using a third part component in a certain app. The component has methods and events. I noticed one particular event was not firing after a while but it should have been. The problem was the...
6
by: Kevin Attard | last post by:
I am using a GridView inside a UserControl which has a template column for deleting the rows. Before databinding the gridview i am attaching the RowCommand and RowDataBound event. I am using the...
2
by: Sam | last post by:
While attempting to get my floating toolbar to work in ASP.NET 2.0, I noticed that the onscroll event is not firing. I've specified this on the BODY tag, as always. After some testing, I...
5
by: jaysonnward | last post by:
Hello All: I've recently been recreating some 'dropdown menus' for a website I manage. I'm writing all my event handlers into my .js file. I've got the coding to work in Firefox, but the...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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,...
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...

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.