Hi,
Thank you for your summary on this. This will benefit the community a lot.
ObjectDataSource is another DataSource object in ASP.NET 2.0 which has many
great features. You can find more information about ObjectDataSource here:
#DataSource Controls and Declarative Programming
http://www.nikhilk.net/DataSourceControlThoughts.aspx
#Data Points: Data Source Controls in ASP.NET 2.0
http://msdn.microsoft.com/msdnmag/is...01/DataPoints/
In your case about removing the top rows with the easiest way, I think
ObjectDataSource can help you do this with a strong typed DataSet. Here's
some brief steps:
1) In Visual Studio 2005, add a new DataSet object, follow the wizard to
configure it, you can choose to use SQL statements or Stored Procedures;
2) On the WebForm, add an ObjectDataSource and configure it to use the
generated DataSet's TableAdapter;
3) Bind a GridView to this ObjectDataSource;
4) Handle ObjectDataSource's Selected Event:
protected void ObjectDataSource1_Selected(object sender,
ObjectDataSourceStatusEventArgs e)
{
DataSet2.EmployeesDataTable dt = e.ReturnValue as
DataSet2.EmployeesDataTable;
for (int i = 0; i < 8; i++)
{
dt.Rows.RemoveAt(0);
}
}
This will remove top 8 rows from the result DataTable.
Hope this helps. Please feel free to post here if anything is unclear.
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.