Using <asp:GridView
and <asp:SqlDataSource
, I can AllowPaging="True"
in the GridView and paging gets added and works perfectly.
However, if I use <asp:GridView
but then don't use the <asp:SqlDataSource
, instead if I use the C# coding method and create a BindData()
function, everything works fine except when I try to actually use the paging.
I get the error:
The GridView 'GridView1' fired event PageIndexChanging which wasn't handled.
Why does this get handeled automatically when <asp:SqlDataSource
and AllowPaging="True"
are used together, but it doesn't get handled when <asp:SqlDataSource
and BindData()
are used together?