WebGrid can assign default values to the NewRow interface when user clicks on the NewRow area.
In this topic, you will learn how to set default text for specific columns when adding new row.
To set default text for specific columns
- Open WebGrid.NET Designer and click See all properties.
- Set AllowAddNew to Yes, AllowEdit to Yes, MarkDefaultValueAsDirty to False and NewRowLostFocusAction to AlwaysPrompt.
- Go to Advanced tab. Select Columns and choose ContactName.
- Set DefaultValue to Maria.
- Run the project. When you click on the NewRow, WebGrid will automatically assign value "Maria" on ContactName column.
Other Resources
Walkthrough Topics
How-to Topics