473,802 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

The GridView 'GridView1' fired event Sorting which wasn't handled

Hi,

I get this error message when sorting a gridview:
The GridView 'GridView1' fired event Sorting which wasn't handled

What do I need to do?

Thanks!
Nov 19 '05 #1
2 11125
Hi,

you have AllowSorting="t rue" set for the GridView and therefore you need to
have event handler for its Sorting event

<asp:GridView AllowSorting=tr ue ID="GridView1" runat="server"
OnSorting="Grid View1_Sorting">
...
</asp:GridView>
protected void GridView1_Sorti ng(object sender, GridViewSortEve ntArgs e)
{
//...
}
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Arjen" <bo*****@hotmai l.com> wrote in message
news:dd******** **@news1.zwoll1 .ov.home.nl...
Hi,

I get this error message when sorting a gridview:
The GridView 'GridView1' fired event Sorting which wasn't handled

What do I need to do?

Thanks!

Nov 19 '05 #2
I tried, I don't get it to work.
I don't know what to add inside the GridView1_Sorti ng method.

I'm using the gridview with templatefields.

Can you help me?

Thanks!


"Teemu Keiski" <jo****@aspalli ance.com> schreef in bericht
news:ep******** ******@TK2MSFTN GP10.phx.gbl...
Hi,

you have AllowSorting="t rue" set for the GridView and therefore you need
to
have event handler for its Sorting event

<asp:GridView AllowSorting=tr ue ID="GridView1" runat="server"
OnSorting="Grid View1_Sorting">
...
</asp:GridView>
protected void GridView1_Sorti ng(object sender, GridViewSortEve ntArgs e)
{
//...
}
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Arjen" <bo*****@hotmai l.com> wrote in message
news:dd******** **@news1.zwoll1 .ov.home.nl...
Hi,

I get this error message when sorting a gridview:
The GridView 'GridView1' fired event Sorting which wasn't handled

What do I need to do?

Thanks!


Nov 19 '05 #3

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

Similar topics

1
5297
by: Arjen | last post by:
Hi, I databind my gridview like this: GridView1.DataSource = Membership.GetAllUsers(); // asp.net 2.0 (MembershipUserCollection) GridView1.DataBind(); When I try to sort the gridview I get this error message: The GridView 'GridView1' fired event Sorting which wasn't handled.
2
16346
by: | last post by:
Hello, I have a GridView in my ASP.NET 2.0 application that performs the paging feature perfect when I have it bound to a data source. But now I have it bound to a dataset and the paging feature will not work. When I try to use paging I get this error: The GridView 'gvResults' fired event PageIndexChanging which wasn't handled.
5
15345
by: Brian McClellan | last post by:
Just wondering if anyone has a simple example of creating a gridview completely programmatically, i'm not doing anything terribly sophisticated. When creating the gridview declaratively evertying works fine, however programmatically, while the grid will display data that exsists in the database, any operation on the data ( editing/updating/deleting ) seems to cause a rowdeleting/updating etc error. Or is this simply not meant to be done?
5
2811
by: GaryDean | last post by:
I have a GridView that works fine when I bind it to an ObjectDataSource at design time. But if I bind it at run time nothing happens. On a button click event I say... GridView1.DataSourceID = ObjectDataSource1.ID; GridView1.DataBind(); What's missing? --
8
7738
by: gerry | last post by:
The PagerSettings.Visible property is not being handled properly by the GridView control. The value assigned to this property is not applied until after a postback. Simplest test : .aspx containing a single gridview - enable paging and give enough data to page. add checkbox with auto postback enable add button with auto postback enable in the GridView1_PreRender method add the following : GridView1.HeaderRow.Enabled =
4
12580
by: Tomasz | last post by:
Hello Developers, Here is interesting problem I just came across: how do I wire a GridView control programmatically? Here is my sample code using Object Data Source: protected void Page_Load(object sender, EventArgs e) { ObjectDataSource ods = new ObjectDataSource("MyTestTableAdapter",
2
6668
by: giveDsolution | last post by:
I want to sort the gridview by clicking the header but it shows the below error The GridView 'GridView1' fired event Sorting which wasn't handled.
1
2045
by: suganya | last post by:
I have displayed the data from the DB to the GridView made a column in the GridView as HyperLink allowed paging by setting the Allow Paging Property to "True". By clicking on the page no link I have to view other records. For that I have given the coding as protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView1.PageIndex = e.NewPageIndex; GridView1.DataBind(); } ...
0
10113
by: =?Utf-8?B?ZWdzZGFy?= | last post by:
Hi, I have created a second gridview when customer clicks on select link with this code: Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand Select Case e.CommandName
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10536
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10285
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
10063
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9114
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...
1
7598
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5494
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...
1
4270
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
3792
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.