Skip to content

Commit

Permalink
Merge pull request #159 from SyncfusionExamples/927978-Data-Validation
Browse files Browse the repository at this point in the history
927978- Update Data Validation
  • Loading branch information
Mohan2401 authored Dec 13, 2024
2 parents 1ca3d7d + 5769f99 commit fa995f4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static void Main(string[] args)

// Data validation for custom data.
IDataValidation validation = worksheet.Range["A3"].DataValidation;
worksheet.Range["A1"].Text = "Enter the value greater than 10 in A1";
worksheet.Range["A1"].Text = "Enter a value greater than 10 in A1";
worksheet.Range["A2"].Text = "Enter the text in A3";
worksheet.Range["A1"].AutofitColumns();
validation.AllowType = ExcelDataType.Formula;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static void Main(string[] args)

//Shows the error message
dateValidation.ShowErrorBox = true;
dateValidation.ErrorBoxText = "Enter Value between 10/5/2003 to 10/5/2004";
dateValidation.ErrorBoxText = "Enter a value between 10/5/2003 and 10/5/2004";
dateValidation.ErrorBoxTitle = "ERROR";
dateValidation.PromptBoxText = "Data validation for date";
dateValidation.ShowPromptBox = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet worksheet = workbook.Worksheets[0];

//Data Validation for List
//Data validation for the list
IDataValidation listValidation = worksheet.Range["C3"].DataValidation;
worksheet.Range["C1"].Text = "Data Validation List in C3";
worksheet.Range["C1"].AutofitColumns();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void Main(string[] args)

//Shows the error message
numberValidation.ShowErrorBox = true;
numberValidation.ErrorBoxText = "Enter Value between 0 to 10";
numberValidation.ErrorBoxText = "Enter a value between 0 and 10";
numberValidation.ErrorBoxTitle = "ERROR";
numberValidation.PromptBoxText = "Data validation for numbers";
numberValidation.ShowPromptBox = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static void Main(string[] args)
IWorkbook workbook = application.Workbooks.Create(1);
IWorksheet worksheet = workbook.Worksheets[0];

//Data Validation for Time
//Data validation for the time
IDataValidation timeValidation = worksheet.Range["B3"].DataValidation;
worksheet.Range["B1"].Text = "Enter the time between 10:00 and 12:00 'o Clock in B3";
worksheet.Range["B1"].AutofitColumns();
Expand Down

0 comments on commit fa995f4

Please sign in to comment.