I have seen the examples for putting a required field validator on textboxes but the same convention does not work for the dropdowns. Here is what we have and we need to get this to work with the dropdown. There isnt a DropDownControl for us to use this with a dropdown as there is with a textbox.
Please let us know what the solution would be for this scenario to change the code above from a textbox to a dropdown. Thanks.
Dim
Service As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("Service"), GridTextBoxColumnEditor)
Dim YCell As TableCell = CType(Service.TextBoxControl.Parent, TableCell)
Dim rfv1 As New RequiredFieldValidator()
Service.TextBoxControl.ID =
"Service"
rfv1.ControlToValidate = Service.TextBoxControl.ID
rfv1.ErrorMessage =
"Please select a Service"
YCell.Controls.Add(rfv1)
Please let us know what the solution would be for this scenario to change the code above from a textbox to a dropdown. Thanks.