Syncfusion.XlsIO.Base
Example 


Syncfusion.XlsIO Namespace > IDataValidation Interface : IsPromptBoxPositionFixed Property

IsPromptBoxPositionFixed Property

True if prompt box position is fixed. otherwise False.
Syntax
'Declaration
 
Property IsPromptBoxPositionFixed As Boolean
'Usage
 
Dim instance As IDataValidation
Dim value As Boolean
 
instance.IsPromptBoxPositionFixed = value
 
value = instance.IsPromptBoxPositionFixed
bool IsPromptBoxPositionFixed {get; set;}
Remarks
Default value for IsPromptBoxPositionFixed is false. Mostly the IsPromptBoxPositionFixed property used for internal purpose. To know more about IsPromptBoxPositionFixed property refer this link.
Example
The following code illustrates the use of IsPromptBoxPositionFixed property.
using Syncfusion.XlsIO;
using System.Drawing;
            
class Example
{
    static void Main()
    {
        using (ExcelEngine excelEngine = new ExcelEngine())
        {
           //Create a worksheet.        
           IApplication application = excelEngine.Excel;
           application.DefaultVersion = ExcelVersion.Excel2013;
           IWorkbook workbook = application.Workbooks.Create(1);
           IWorksheet worksheet = workbook.Worksheets[0];
           worksheet.Range["C3"].CellStyle.Color = Color.LightGray;
           worksheet.Range["C1"].Text = "Data Validation List in C3";
           worksheet.Range["C1"].AutofitColumns();
            
           // DataValidation in Worksheet Range
           IDataValidation dataValidation = worksheet.Range["C3"].DataValidation;
           dataValidation.ListOfValues = new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday" };
           dataValidation.PromptBoxTitle = "Sample"; 
           dataValidation.PromptBoxText = "Data validation for list";
           dataValidation.ShowPromptBox = true;
           dataValidation.PromptBoxHPosition = 25; 
           dataValidation.PromptBoxVPosition = 30; 
           dataValidation.IsPromptBoxPositionFixed = true; //True if prompt box position is fixed
           dataValidation.IsPromptBoxVisible = true; 
           dataValidation.IsListInFormula = true; 
           workbook.SaveAs("DataValidation.xlsx");
           workbook.Close();
           excelEngine.Dispose();
        }
     }
 }
AssemblyVersion

Syncfusion.XlsIO.Base: 17.2460.0.34

See Also