Bug in spread 4.0.3515 2008 combobox

Posted by: dotnetuser on 8 September 2017, 2:14 pm EST

  • Posted 8 September 2017, 2:14 pm EST

    Installed version 4.0.3515 2008 of the spread and getting the following error:


     


    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.


    ************** Exception Text **************
    System.Exception: Exception handled in FpSpread.WndProc ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at FarPoint.Win.SuperEditBase.set_ControlType(ControlType value)
       at FarPoint.Win.FpCombo.set_Editable(Boolean value)
       at FarPoint.Win.Spread.CellType.ComboBoxCellType.InitializeEditorControl(Control control, Appearance appearance, Single zoomFactor)
       at FarPoint.Win.Spread.CellType.BaseCellType.GetReusableEditorControl(IReuseEditorControl irec, Control parent, Appearance appearance, Single zoomFactor)
       at FarPoint.Win.Spread.CellType.ComboBoxCellType.GetEditorControl(Control parent, Appearance appearance, Single zoomFactor)
       at FarPoint.Win.Spread.SpreadView.StartCellEditing(EventArgs e, Boolean formula)
       at FarPoint.Win.Spread.SpreadView.a(Int32 A_0, Int32 A_1, MouseEventArgs A_2)
       at FarPoint.Win.Spread.SpreadView.g(MouseEventArgs A_0)
       at FarPoint.Win.Spread.FpSpread.OnMouseDown(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
       --- End of inner exception stack trace ---
       at FarPoint.Win.Spread.FpSpread.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    Create a new window appliation in .Net 2008:


    Add a MDIparent screen.


    Add a button to the MDIParent screen that will display Form1.

    <FONT size=2>

    </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Form1</FONT></FONT><FONT size=2> f = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Form1</FONT></FONT><FONT size=2>();


    f.Show();


    </FONT>In Form1 plop the following code:


     

    <FONT color=#0000ff size=2><FONT color=#0000ff size=2>

    namespace</FONT></FONT><FONT size=2> FarpointSQL2008CBOTesting


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>partial</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Form1</FONT></FONT><FONT size=2> : </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Form

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> Form1()


    {


    InitializeComponent();


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>private</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> Form1_Load(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>object</FONT></FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EventArgs</FONT></FONT><FONT size=2> e)


    {


    fpSpread1.Sheets[0].ColumnCount = 0;


    fpSpread1.SuspendLayout();


     


    fpSpread1.Sheets[0].RowCount = 2;


    fpSpread1.Sheets[0].ColumnCount = 4;


    FarPoint.Win.Spread.CellType.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>ComboBoxCellType</FONT></FONT><FONT size=2> cboCellType = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2>();


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[] strCBO1 = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[3];


     


    strCBO1[0] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 1"</FONT></FONT><FONT size=2>;


    strCBO1[1] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 2 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO1[2] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 3 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    cboCellType.Items = strCBO1;


     


    fpSpread1.Sheets[0].Columns[0].CellType = cboCellType;


    fpSpread1.Sheets[0].Columns[0].Label = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Native CBO 1"</FONT></FONT><FONT size=2>;


     


    cboCellType = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    cboCellType = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2>();


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[] strCBO2 = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[10];


    strCBO2[0] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 1"</FONT></FONT><FONT size=2>;


    strCBO2[1] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 2 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2[2] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 3 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2[3] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 4 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2[4] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 5 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2[5] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 6 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2<img src="/emoticons/emotion-14.gif" alt="Devil" /> = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 7 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2[7] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 8 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2<img src="/emoticons/emotion-29.gif" alt="Music" /> = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 9 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO2[9] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 10 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    cboCellType.Items = strCBO2;


    fpSpread1.Sheets[0].Columns[1].CellType = cboCellType;


    fpSpread1.Sheets[0].Columns[1].Label = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Native CBO 2"</FONT></FONT><FONT size=2>;


     


     


    FarpointSQL2008CBOTesting.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2> fpCombo = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2>();


     


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[] strCBO3 = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[3];


     


    strCBO3[0] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 1"</FONT></FONT><FONT size=2>;


    strCBO3[1] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 2 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO3[2] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 3 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    fpCombo.Items = strCBO1;


    cboCellType = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    cboCellType = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2>();


    fpSpread1.Sheets[0].Columns[2].CellType = fpCombo;


    fpSpread1.Sheets[0].Columns[2].Label = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"My Custom Combo CBO 1"</FONT></FONT><FONT size=2>;


    fpCombo = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    fpCombo = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> FarpointSQL2008CBOTesting.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2>();


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[] strCBO4 = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2>[10];


     


    strCBO4[0] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 1"</FONT></FONT><FONT size=2>;


    strCBO4[1] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 2 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4[2] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 3 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4[3] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 4 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4[4] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 5 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4[5] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 6 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4<img src="/emoticons/emotion-14.gif" alt="Devil" /> = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 7 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4[7] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 8 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4<img src="/emoticons/emotion-29.gif" alt="Music" /> = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 9 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    strCBO4[9] = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 10 CCCCCCCCCCCCCCCCCCCCC"</FONT></FONT><FONT size=2>;


    fpCombo.Items = strCBO4;


    fpSpread1.Sheets[0].Columns[3].HorizontalAlignment = FarPoint.Win.Spread.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>CellHorizontalAlignment</FONT></FONT><FONT size=2>.Justify;


    fpSpread1.Sheets[0].Columns[3].CellType = fpCombo;


    fpSpread1.Sheets[0].Columns[3].Label = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"My Custom Combo CBO 2"</FONT></FONT><FONT size=2>;


     


     


     


     


    fpSpread1.Sheets[0].Cells[0, 0].Text = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 1"</FONT></FONT><FONT size=2>;


     


    fpSpread1.Sheets[0].Cells[0, 1].Text = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 1"</FONT></FONT><FONT size=2>;


     


     


    fpSpread1.Sheets[0].Cells[0, 2].Text = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item 1"</FONT></FONT><FONT size=2>;


     


    fpSpread1.Sheets[0].Cells[0, 3].Text = </FONT><FONT color=#a31515 size=2><FONT color=#a31515 size=2>"Item Long 1"</FONT></FONT><FONT size=2>;


     


    fpSpread1.ResumeLayout();


     


    }


    }


    }


    </FONT>And last but not least the here is the code for the  <FONT color=#2b91af>FPComboCellType it has been given by you in a previous post to simulate the old behavior of the combo box that was changed with the latest versions:</FONT>


    <FONT color=#2b91af></FONT> 

    <FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FPComboCellType</FONT></FONT><FONT size=2> : FarPoint.Win.Spread.CellType.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>ComboBoxCellType

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>private</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>ADDFPCombo</FONT></FONT><FONT size=2> cNew = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> System.Windows.Forms.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Control</FONT></FONT><FONT size=2> GetEditorControl(FarPoint.Win.Spread.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Appearance</FONT></FONT><FONT size=2> appearance, </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Single</FONT></FONT><FONT size=2> zoomFactor)


    {


    FarPoint.Win.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FpCombo</FONT></FONT><FONT size=2> cOrig;


    cOrig = (FarPoint.Win.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FpCombo</FONT></FONT><FONT size=2>)(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>base</FONT></FONT><FONT size=2>.GetEditorControl(appearance, zoomFactor));


    cNew = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>ADDFPCombo</FONT></FONT><FONT size=2>();


    cNew.Formatter = cOrig.Formatter;


    cNew.ButtonStyle = cOrig.ButtonStyle;


    cNew.AutoHeight = cOrig.AutoHeight;


    cNew.BorderStyle = cOrig.BorderStyle;


    cNew.Editable = cOrig.Editable;


    cNew.Multiline = cOrig.Multiline;


    cNew.WordWrap = cOrig.WordWrap;


    cNew.AcceptsReturn = cOrig.AcceptsReturn;


    cNew.ListOffset = cOrig.ListOffset;


    cNew.List = cOrig.List;


    cNew.MaxDrop = cOrig.MaxDrop;


    cNew.ListWidth = cOrig.ListWidth;


    cNew.MarginLeft = cOrig.MarginLeft;


    cNew.AutoSearch = cOrig.AutoSearch;


    cNew.ListAlignment = cOrig.ListAlignment;


    cNew.MaximumLength = cOrig.MaximumLength;


    cNew.ButtonWidth = cOrig.ButtonWidth;


    cNew.AcceptsArrowKeys = cOrig.AcceptsArrowKeys;


    cNew.ListControl = cOrig.ListControl;


    cNew.NullColor = cOrig.NullColor;


    cNew.ForeColor = cOrig.ForeColor;


    cNew.Font = cOrig.Font;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> cNew;


    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//GetEditorControl

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>object</FONT></FONT><FONT size=2> GetEditorValue()


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>switch</FONT></FONT><FONT size=2> (EditorValue)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>case</FONT></FONT><FONT size=2> FarPoint.Win.Spread.CellType.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EditorValue</FONT></FONT><FONT size=2>.String:


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> cNew.Text;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>case</FONT></FONT><FONT size=2> FarPoint.Win.Spread.CellType.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EditorValue</FONT></FONT><FONT size=2>.Index:


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> cNew.SelectedIndex;


    }


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//GetEditorValue

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> SetEditorValue(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>object</FONT></FONT><FONT size=2> value)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (cNew == </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2>;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (value == </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2> | value == </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>DBNull</FONT></FONT><FONT size=2>.Value)


    {


    cNew.SelectedIndex = -1;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (Editable & cNew != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)


    cNew.Text = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (EditorValue == FarPoint.Win.Spread.CellType.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EditorValue</FONT></FONT><FONT size=2>.String)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>string</FONT></FONT><FONT size=2> s = value.ToString();


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (ListControl != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (ListControl.FindString(s) != -1 | cNew.Editable)


    cNew.Text = s;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (cNew.List.Contains(s) | cNew.Editable)


    cNew.Text = s;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (cNew.List.Contains(s))


    cNew.SelectedItem = s;


    }


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (EditorValue == FarPoint.Win.Spread.CellType.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EditorValue</FONT></FONT><FONT size=2>.Index)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> index = -1;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>try

    </FONT></FONT><FONT size=2>

    {


    index = </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Convert</FONT></FONT><FONT size=2>.ToInt32(value);


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>catch

    </FONT></FONT><FONT size=2>

    {


    }


    cNew.SelectedIndex = index;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else

    </FONT></FONT><FONT size=2>

    cNew.SelectedIndex = -1;


    }


    }


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>bool</FONT></FONT><FONT size=2> StopEditing()


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (cNew != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)


    {


    cNew.ShowList(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>false</FONT></FONT><FONT size=2>);


    }


    FireEditingStopped();


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (cNew != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)


    {


    cNew.Dispose();


    cNew = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>true</FONT></FONT><FONT size=2>;


    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//StopEditing

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> StartEditing(</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EventArgs</FONT></FONT><FONT size=2> e, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>bool</FONT></FONT><FONT size=2> selectAll, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>bool</FONT></FONT><FONT size=2> autoClipboard)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (!((e == </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>) | (cNew == </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)))


    {


    </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Rectangle</FONT></FONT><FONT size=2> rc = cNew.Bounds;


    </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Rectangle</FONT></FONT><FONT size=2> rectButton = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Rectangle</FONT></FONT><FONT size=2>(rc.X + rc.Width - 14, rc.Y, 14, rc.Height);


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (e </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>is</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>MouseEventArgs</FONT></FONT><FONT size=2> && !Editable && !(rectButton.Contains(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Point</FONT></FONT><FONT size=2>(((</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>MouseEventArgs</FONT></FONT><FONT size=2>)e).X, ((</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>MouseEventArgs</FONT></FONT><FONT size=2>)e).Y))))


    {


    cNew.Focus();


    cNew.ShowList(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>true</FONT></FONT><FONT size=2>);


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (selectAll & Editable)


    {


    cNew.EditModeCursorPosition = FarPoint.Win.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EditModeCursorPosition</FONT></FONT><FONT size=2>.SelectAll;


    cNew.SelectAll();


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>else

    </FONT></FONT><FONT size=2>

    cNew.EditModeCursorPosition = FarPoint.Win.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>EditModeCursorPosition</FONT></FONT><FONT size=2>.End;


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> ((e </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>is</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>KeyPressEventArgs</FONT></FONT><FONT size=2>) & (!(Editable)))


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> WM_CHAR = 258;


    </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Message</FONT></FONT><FONT size=2> m = </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Message</FONT></FONT><FONT size=2>.Create(cNew.Handle, WM_CHAR, </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>IntPtr</FONT></FONT><FONT size=2>(System.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Convert</FONT></FONT><FONT size=2>.ToInt32(((</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>KeyPressEventArgs</FONT></FONT><FONT size=2>)e).KeyChar.ToString())), </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>IntPtr</FONT></FONT><FONT size=2>(0));


    cNew.WindowTarget.OnMessage(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ref</FONT></FONT><FONT size=2> m);


    }


    }


    }


    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//StartEditing

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> CancelEditing()


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> ((cNew != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>))


    {


    cNew.ShowList(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>false</FONT></FONT><FONT size=2>);


    }


    FireEditingCanceled();


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (cNew != </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>)


    {


    cNew.Dispose();


    cNew = </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>null</FONT></FONT><FONT size=2>;


    }


    </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//CancelEditing

    </FONT></FONT><FONT size=2>

    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//myComboCellType

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>ADDFPCombo</FONT></FONT><FONT size=2> : FarPoint.Win.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>FpCombo

    </FONT></FONT><FONT size=2>

    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>protected</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>bool</FONT></FONT><FONT size=2> IsInputKey(</FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Keys</FONT></FONT><FONT size=2> keyData)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (keyData == </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Keys</FONT></FONT><FONT size=2>.Return)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>false</FONT></FONT><FONT size=2>;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>base</FONT></FONT><FONT size=2>.IsInputKey(keyData);


    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//IsInputKey

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>protected</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>override</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2> WndProc(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ref</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT color=#2b91af size=2>Message</FONT></FONT><FONT size=2> m)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>switch</FONT></FONT><FONT size=2> (m.Msg)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>case</FONT></FONT><FONT size=2> 0X102: </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>// WM_CHAR

    </FONT></FONT><FONT size=2>

    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>true</FONT></FONT><FONT size=2>)


    {


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (m.WParam.ToInt32() == 13)


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>return</FONT></FONT><FONT size=2>;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>break</FONT></FONT><FONT size=2>;


    }


    </FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>base</FONT></FONT><FONT size=2>.WndProc(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>ref</FONT></FONT><FONT size=2> m);


    } </FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>//WndProc

    </FONT></FONT><FONT size=2>

    }


    }


    }

    </FONT>

    <FONT color=#2b91af>Just open those comboboxes and you should have easily this error.</FONT>


     


     

  • Replied 8 September 2017, 2:14 pm EST

    Hello,

    I have reported this issue as a bug(# 99914534) to our QA team.This should be fixed in our next maintenance release of Spread for Windows Forms.

     

    Thanks,

     

  • Replied 8 September 2017, 2:14 pm EST

    Can we expect the next maintenance release soon? In a few days?


    If not when should we expect it?

  • Replied 8 September 2017, 2:14 pm EST

    Hello,

    As of now we do not have the expected dates for the availability of next maintenance release of Spread. We try to make the maintenance build available in every 3 months (as per last year's trend). We will notify about the availability of same, as we have already forwarded this to the concerned team

    Thanks

  • Replied 8 September 2017, 2:14 pm EST

    The current release we’re using is 4.0.3509 and it has major issues with scrolling in the spread. We’re really hoping that 4.0.3515 2008 will take care of this problem to our surprise 4.0.3515 2008 has more serious problem. So we’re kind of stuck now and we we’re really hoping to get this fixed ASAP.
  • Replied 8 September 2017, 2:14 pm EST

    Hello,

    This issue is not addressed in this build of Spread 4.I reported this issue after testing with 4.0.3515.2008 as the issue was replicable with this version too. The next maintenance release of Spread will be out in the middle of April, it should have this issue fixed.

    Thanks,

     

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels