This walkthrough shows you how to use NumericUpDown in WebGrid.
During this walkthrough, you will learn how to do the following:
- Bind WebGrid with AccessDatasource.
- Setting a NumericUpDown control in a grid column using WebGrid Designer.
Prerequisites
In order to complete this walkthrough, you will need the following:
- Visual Studio 2005 Application.
Step-By-Step Instructions
To create new web application and specify NumericUpDown control in WebGrid
- Bind WebGrid to AccessDataSource.
- Please use Products table instead of Customers table.
- Right click on WebGrid and click on Retrieve Structure to retrieve all columns based on assigned DataSource.
- Go to the WebGrid designer.
- Set WebGrid's properties AllowEdit to true
- Go to Advanced, click See All Properties.
- Specify the CustomEditorName property to NumericUpDown.
- Set the EditType property to Custom.
- Set the CustomEditorProperties
- There are two properties available in NumericUpDown CustomEditorProperties property that can be set:
- MinValue: The minimal value allowed for the control. Data Type: int. Default Value: 0.
- MaxValue: The maximal value allowed for the control. Data Type: int. Default Value: 2147483647.
References
CustomEditorName Property
EditType Property
CustomEditorProperties Property
Other Resources
Walkthrough Topics
How-to Topics