We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to set selected value of PdfLoadedComboBoxField

I am using the Pdf component in Asp.net to programatically fill out the newly released I-9 form.
The Syncfusion Documentation says that the selectedIndex field of the PdfLoadedComboBoxField is an int, and that the selectedValue is a string.  However when I examine them in the debugger i find that the selectedIndex is int[1] and the selectedValue is a string[0].  so when I try this:
    myPdfLoadedComboBoxField.SelectedValue = 3;
I get the error:
    Cannot implicitly convert type 'int' to 'int[]'
I have also tried the following without success:
    fld.SelectedIndex[0] =7;
    fld.SelectedIndex = new int[1];
    fld.SelectedValue = "CA"
    fld.SelectedValue = new string[1]{"CA"}

2 Replies

JG Jeff Gilbert March 21, 2013 08:18 PM UTC

Figured it out.  This worked:
    (Field as PdfLoadedComboBoxField).SelectedValue = new string[] {Value};

PH Praveenkumar H Syncfusion Team April 1, 2013 07:09 AM UTC

Hi Jeff,

Thank you for using Syncfusion products,

We are happy to hear that you have found the solution  to set selected value of PdfLoadedComboBoxField.

To know more information about the Pdf forms please visit the below link.

Please let us know if you have any concern,

With regards,

Live Chat Icon For mobile
Up arrow icon