Property Name | Allowed Values | Description |
IsRequired | True/False | Set to True if you want the field to be a required field |
IsRequiredInitialValue | String | This property is used to specify the initial value for the field and compare if the field value has changed.
** Only valid if IsRequired = True
|
This post will teach you how to :
- Setup required field validation for dropdown field
- Changing value for selected text
Step 1 : Add a DetailsView with DropDown field
Step 2 : Set IsRequired field property to ‘True’
Result :
- A validation message is displayed when the ‘Save’ button is clicked.
Changing value for selected value in dropdown field
Step 1 : Set IsRequiredInitialValue to ‘I need to change this’
Result :
- Selected value will be ‘I need to change this’
- A validation message is displayed if user does not select a different value
Step 2 : Set IsRequiredInitialValue property as blank
Result
- Selected value will be blank
Additional information
- You cannot change the validation message.
- You can use Custom Setting / Page Parameter / System Variable / SQL Query to specify IsRequiredInitialValue text.
- If IsRequiredInitialValue is populated, DefaultValue will be overridden
[…] Stadium3 « Format Conditions Required Field Validation for DropDown fields […]
ReplyDelete[…] Required field validation for DetailsView dropdown columns […]
ReplyDelete[…] Data Input Drop Down Field has new properties IsRequired and IsRequiredInitialValue – these work the same way as the IsRequired properties on the DetailsView control. See more info here […]
ReplyDelete