This walkthrough shows you how to use load-on-demand data retrieval with ISDataSource control.
During this walkthrough, you will learn how to do the following:
- Use ISDataSource.
- Use SmartTag to set DataSource.
- Use DataSourceConfigurationWizard to set the Database and table.
- Set load-on-demand data retrieval.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Access to the Microsoft Access Northwind database.
- Visual Studio 2005 Application.
Step-By-Step Instructions
To create new web application, bind WebCombo to ISDataSource and set load on demand
- Launch Visual Studio.NET 2005.
- Click on File menu, then select New and click Web Site.
- Select ASP.NET Web Site in the Template box and set Location to HTTP.
- Named the Web Site and click OK.
- Right-click on Project's name and select Add New Item.
- Select Intersoft AppForm in the My Templates box and named it as Walkthrough.aspx.
- Drag WebCombo instance from ToolBar to WebForm.
- Click the SmartTag on the upper right of the WebCombo.
- In Choose Data Source field, choose <New data source...>.
- In Data Source Configuration Wizard, choose ISDataSource and click OK.
- Select the Schema Type that you want to use and click Next.
- Add the table required and click Finish.
- Click the WebCombo instance and press F4.
- Set the AllowAutoQueryHandler to False.
- Then, right-click ISDataSource instance and choose ISDataSource Designer.
- Set SelectMethod to GetData.
- Set TypeName to dsNorthwind_ReadOnlyTableAdapters.CustomersTableAdapter.
- Set EnablePaging to Yes.
- Set the SelectCountMethod to SelectCount.
- Set the MaximumRowsParameterName to maximumRows.
- Set StartRowIndexParameterName to startRowIndex.
- Run the project and the combo will look like following.