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

SortCommend event is being fired twice

Hi Group,

In my application I am using a datagrid, now I m implementing sorting
for that datagrid,
I am changing the flag for ascending and descending when SortCommand
event of datagrid is fired.

Now the problem I am facing is that the Sort Command event is being
fired twice even if I click the header in datagrid only once thus my
flag is getting reset to the original value.

(I know that the event is first raised during the restoration of the
page's view state. The second notification arrives when the page is
being built.)
(I am using .Net 1.1)

Please help me out in this!!

Thanks,

Anup Daware
An*********@gmail.com

Aug 1 '06 #1
2 1885
Post some snippet code.
You must have it somewhere else thats why is firing twice
Patrick
"Anup" <an*********@gmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Hi Group,

In my application I am using a datagrid, now I m implementing sorting
for that datagrid,
I am changing the flag for ascending and descending when SortCommand
event of datagrid is fired.

Now the problem I am facing is that the Sort Command event is being
fired twice even if I click the header in datagrid only once thus my
flag is getting reset to the original value.

(I know that the event is first raised during the restoration of the
page's view state. The second notification arrives when the page is
being built.)
(I am using .Net 1.1)

Please help me out in this!!

Thanks,

Anup Daware
An*********@gmail.com

Aug 1 '06 #2
Got the answer to this :)
I registered the event as well as set the value of
OnSortCommand="SortCommand......"
so when I removed it from properties of datagrid the problem is solved

<Thanks Patrick you pointed it correctly>

Thanx,
Anup Daware
Patrick.O.Ige wrote:
Post some snippet code.
You must have it somewhere else thats why is firing twice
Patrick
"Anup" <an*********@gmail.comwrote in message
news:11*********************@b28g2000cwb.googlegro ups.com...
Hi Group,

In my application I am using a datagrid, now I m implementing sorting
for that datagrid,
I am changing the flag for ascending and descending when SortCommand
event of datagrid is fired.

Now the problem I am facing is that the Sort Command event is being
fired twice even if I click the header in datagrid only once thus my
flag is getting reset to the original value.

(I know that the event is first raised during the restoration of the
page's view state. The second notification arrives when the page is
being built.)
(I am using .Net 1.1)

Please help me out in this!!

Thanks,

Anup Daware
An*********@gmail.com
Aug 8 '06 #3

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

Similar topics

3
by: Peter Row | last post by:
Hi, I have created a user control consisting of a textbox and a separate vertical scroll bar. The textbox is filled with data. However there could be lots of data so I only fill the textbox...
7
by: | last post by:
Hello to all I'm handling the Validating event for one text box. If something is wrong in user input I show a warning message. The problem is that if I add to method the message is displayed...
7
by: sanjana | last post by:
hi i wanna detect if a anything is connected to the usb port I am using system.management class for tht purpose this is my code class usbdetect { public static void Main() {
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
1
by: e | last post by:
I have an ownerdrawn listbox that paints items in various colors dependant upon whether or not it has focus, selected, etc. The code that physically paints the items is in the drawItem event, and...
2
by: Simon Verona | last post by:
I have a usercontrol with code in the "leave" event which updates the final data back into a database. This works fine except if I have a default "accept" button on a form and invoke it by...
7
by: tshad | last post by:
I thought I understood how the SaveViewState is working and was trying to use this (as per some code I found) to detect refreshes. It seemed to be working but I found that the SaveViewState was...
0
by: Daniel | last post by:
I've created a custom control including some Literal ( constructed with html markup) and an ImageButton firing event ( add a vote ). public event VoteCommandEventHandler VoteCommand; protected...
2
by: archana | last post by:
Hi all, I am having one datagrid whose datasource i set as array. On itemcreated event i am having one counter which i have used to find out how many times item created event is fired. What...
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
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...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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...
0
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...

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.