2X faster development
The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
This knowledge Base explains that how we export the Grid when we bind the SQL DataSource in ASP.NET.
Solution: In ASP.NET Grid using Export() server method we can export the Grid into excel, PDF and word documents. In Export() server method we passed the dataSource as a parameter and in this method we need to pass the dataSource as IEnumerable or Datatable. When we bind SqlDataSource we need to retrieve the data from the database using select method of SqlDataSource. In select method we have to retrieve data using SelectCommand SQL string. The following code example demonstrates how to we export the Grid when we bind the SQL DataSource in ASP.NET. ASP.NET: 1. Render the Grid Control.
2. Retrieving the data from the database using select method and passed the dataSource in export() server method.
Result:
|
2X faster development
The ultimate ASP.NET Web Forms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.
Thank you. This is very usefull.