Last post Jul 05, 2011 01:09 PM by seanymullz
Nov 26, 2005 03:40 AM|jstranger|LINK
Jul 06, 2007 06:27 PM|kylelang|LINK
I couldn't believe there wasn't an easier way either...so I kept looking and here's what I came up with:
The scenario here is that I have a GridView control bound to an ObjectDataSource. The ObjectDataSource business object is a DataAdapter. The GridView has paging enabled, however, the ObjectDataSource does not need a SelectCountMethod configured in this case,
as some other posts would have you believe. I have a couple of DropDownList controls on the page that AutoPostBack on SelectedIndexChanged so that I can modify the FilterParameters list. Anytime the GridView gets populated with different filtered contents
I need to update the Label showing the count of items in the filtered results. This solution will only work if your ObjectDataSourceStatusEventArgs parameter's ReturnValue property casts to a DataTable, because it depends on DataTable's Compute method. There's
obviously a lot of potential for other uses with this method though as well.
objectdatasource gridview datatable
Nov 20, 2007 02:36 PM|jammoral|LINK
That was awesome, great work. Now I can stop banging my head against the desk.
Dec 03, 2009 05:12 AM|sus2bhai|LINK
great work, thanks a lot
Dec 09, 2009 03:21 PM|sdiazc|LINK
Just great, thanks!
Jul 05, 2011 01:09 PM|seanymullz|LINK
Very awesome indeed! Many thanks!