469,576 Members | 1,785 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,576 developers. It's quick & easy.

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 10862
Hi,

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

<asp:GridView AllowSorting=true ID="GridView1" runat="server"
OnSorting="GridView1_Sorting">
...
</asp:GridView>
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
//...
}
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Arjen" <bo*****@hotmail.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_Sorting method.

I'm using the gridview with templatefields.

Can you help me?

Thanks!


"Teemu Keiski" <jo****@aspalliance.com> schreef in bericht
news:ep**************@TK2MSFTNGP10.phx.gbl...
Hi,

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

<asp:GridView AllowSorting=true ID="GridView1" runat="server"
OnSorting="GridView1_Sorting">
...
</asp:GridView>
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
//...
}
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

"Arjen" <bo*****@hotmail.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Arjen | last post: by
5 posts views Thread by Brian McClellan | last post: by
5 posts views Thread by GaryDean | last post: by
1 post views Thread by suganya | last post: by
reply views Thread by =?Utf-8?B?ZWdzZGFy?= | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.