| MultiRow Windows Forms > Developer's Guide > Using MultiRow > User Input Validation > Built-in Validation Actions > Notification using Sound (SoundNotify) |
You can use SoundNotify to notify the user of a validation error using a sound. This generated sound can be any of the following system sounds. In addition, you can use the SoundNotify.SoundLocation property to notify of a validation error by using a specified sound.
![]() |
|
Complete the following steps to use SoundNotify for cell validation.
The following code generates a sound as the validation error when the value in textBoxCell is blank.
Imports GrapeCity.Win.MultiRow
Dim textBoxCell1 As New TextBoxCell()
Dim requiredFieldValidator1 As New RequiredFieldValidator()
requiredFieldValidator1.Actions.Add(New SoundNotify())
textBoxCell1.Validators.Add(requiredFieldValidator1)
Dim cells As Cell() = {textBoxCell1}
GcMultiRow1.Template = Template.CreateGridTemplate(cells)
GcMultiRow1.RowCount = 10
|
using GrapeCity.Win.MultiRow;
TextBoxCell textBoxCell1 = new TextBoxCell();
RequiredFieldValidator requiredFieldValidator1 = new RequiredFieldValidator();
requiredFieldValidator1.Actions.Add(new SoundNotify());
textBoxCell1.Validators.Add(requiredFieldValidator1);
Cell[] cells = { textBoxCell1 };
gcMultiRow1.Template = Template.CreateGridTemplate(cells);
gcMultiRow1.RowCount = 10;
|
If the sound is not generated, check the following: