Cell Value Not Updating After Manual Override in CurrentCellValueChanged

Hello,

Problem Description: I am attempting to intercept a user selection from a DataValidation dropdown and programmatically modify the value before it is committed to the cell. Although I am updating the cell value in the underlying sheet, the UI continues to display the original string selected by the user, effectively ignoring my logic.

Steps to Reproduce:

  1. Data Validation Assignment: A cell is assigned a DataValidation rule with a list of string options.

  2. User Selection: The user clicks the dropdown and selects a string (e.g., "Option A").

  3. Event Trigger: The ActiveGrid_CurrentCellValueChanged event fires.

  4. Modification Logic: Inside the event, I process the e.ControlText through a custom method (ConvertToCellFropDropDown) to determine a new, different string (e.g., "Modified_Option_A").

  5. Assignment Attempt: I assign this new string to the cell using sheet[rowIndex, columnIndex].Value = newValue;.

Expected Result: The cell should display the "Modified_Option_A" string and commit it to the model.

Actual Result: The cell ignores the manual assignment and remains populated with the original "Option A" selection. It appears the internal renderer or the DataValidation logic is overwriting the manual value assignment immediately after the event handler finishes.

Regards,

Vadim


8 Replies

RC Raj Clinton Gnanaprakasam Syncfusion Team February 11, 2026 12:32 PM UTC

Hi Vadim,

We are currently analyzing the reported scenario. We need some time to validate the scenario. We will provide further updates on or before February 13, 2026.

Regards,
Raj Clinton G


RC Raj Clinton Gnanaprakasam Syncfusion Team February 13, 2026 01:59 PM UTC

Hi Vadim,

We have reviewed your query and implemented a workaround to update the cell value by customizing the CellRenderers in the spreadsheet. Please refer to the code snippet below:
public class CustomComboboxCellRenderer : SpreadsheetComboBoxCellRenderer
{
    SfSpreadsheet _spreadheet;
    TextBox _innerTextBox;
    bool _isUpdating;
 
    public CustomComboboxCellRenderer(SfSpreadsheet sheet) => _spreadheet = sheet;
 
    protected override void OnWireEditUIElement(ComboBox ui)
    {
        base.OnWireEditUIElement(ui);
        _innerTextBox = FocusManagerHelper.FindVisualChildren<TextBox>(ui).FirstOrDefault();
        ui.SelectionChanged += OnSelChanged;
    }
 
    protected override void OnUnwireEditUIElement(ComboBox ui)
    {
        ui.SelectionChanged -= OnSelChanged;
        _innerTextBox = null;
        base.OnUnwireEditUIElement(ui);
    }
 
    void OnSelChanged(object sender, SelectionChangedEventArgs e)
    {
        var cb = sender as ComboBox;
        if (cb == null) return;
 
        // compute display text before dispatcher
        var selected = cb.SelectedValue?.ToString() ?? cb.SelectedItem?.ToString() ?? cb.Text;
        var display = GetModifiedText(selected);
 
        // update modified text on UI thread
        cb.Dispatcher.BeginInvoke(new Action(() =>
        {
            var tb = _innerTextBox ?? FocusManagerHelper.FindVisualChildren<TextBox>(cb).FirstOrDefault();
            if (tb != null) tb.Text = display;
            else cb.Text = display;
 
            // optional: update data validation for the cell, to avoid the validation error when modified text is different from the original list value
            var sheet = _spreadheet.Workbook.ActiveSheet;
            var cellRange = sheet[CurrentCellIndex.RowIndex, CurrentCellIndex.ColumnIndex];
            var validation = cellRange.DataValidation;
            if (validation != null && validation.AllowType == ExcelDataType.User)
                validation.ListOfValues = new[] { display, "Option A", "Option B", "Option C" };
 
        }), DispatcherPriority.Background);
 
    }
 
   }
We have also attached a video and sample for your reference. Could you please review and confirm whether it works on your end?

Please let us know if you need any further assistance or clarification.
Regards,
Raj Clinton G 

Attachment: SampleVideo_3aa594be.zip


VA Vadim February 13, 2026 03:08 PM UTC

Hello Raj,

Your implementation works as intended. I really appreciate your help and support


Regards



VA Vadim February 13, 2026 03:34 PM UTC

Hello Raj,


I just noticed that when selecting a string longer than the cell can fit, the data in the cells on the left and right is getting hidden from view. Please see the attached image for an explanation.

Regards

Attachment: Combobox_data_hidden_from_view_f85cfd70.png


RC Raj Clinton Gnanaprakasam Syncfusion Team February 16, 2026 01:10 PM UTC

Hi Vadim,

We have checked and confirmed the reported issue "Floating cell appears when selecting a value from the ComboBox cell in the SfSpreadsheet" as a defect. We have logged a bug, and We will fix this issue and include it in our First weekly NuGet release after the 2026 Volume 1 Main release, which is scheduled for the second week of March.

You can track the status of this report through the following feedback link,


Note: The provided feedback link is private, and you need to log in to view this feedback.
 
We will let you know once it is released. We appreciate your patience until then.
 
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.

Regards,
Raj Clinton G


RC Raj Clinton Gnanaprakasam Syncfusion Team March 10, 2026 01:27 PM UTC

Hi Vadim,
We sincerely apologize for the inconvenience. The First weekly NuGet release after the Volume 1 release is not scheduled for this week. However, the fix for the issue related to “Floating cell appears when selecting a value from the ComboBox cell in the SfSpreadsheet” was also not included in this week’s NuGet package release.
While the issue has been addressed and a fix has been implemented, we encountered some issues during the testing phase, which prevented its inclusion in the current release. We will resolve these issues and include the fix in our First weekly NuGet release following the 2026 Volume 1 Main release, which is scheduled for the fourth week of March.
Regards,
Raj Clinton G


RC Raj Clinton Gnanaprakasam Syncfusion Team March 24, 2026 12:57 PM UTC

Hi Vadim,

We sincerely apologize for the delay and any inconvenience this may have caused. Unfortunately, the fix for the issue “Floating cell appears when selecting a value from the ComboBox cell in the SfSpreadsheet” was not included in today’s NuGet package release as previously promised.

As mentioned earlier, the issue has already been addressed, and a fix has been implemented. However, during the final testing phase, we encountered some stability concerns that prevented us from safely including the fix in this release. These stability issues have now been resolved, and the fix is confirmed for inclusion in our upcoming weekly NuGet release, scheduled for the last weekly release of March 2026, without any further delays.

We appreciate your patience and understanding in the meantime.


Regards,
Raj Clinton G


RC Raj Clinton Gnanaprakasam Syncfusion Team March 31, 2026 07:03 AM UTC

Hi Vadim,

 

We are glad to announce that our weekly patch release (33.1.46) is rolled out. We have included the fix for the reported “Floating cell appears when selecting a value from the ComboBox cell in the SfSpreadsheet” issue in this release. So, kindly upgrade your package version to the latest to avail of these changes (33.1.46).

 

Package Link: NuGet Gallery | Syncfusion.SfSpreadsheet.WPF 33.1.46

 

Feedback Link: Floating cell appears when selecting a value from the ComboBox cell in the spreadsheet in WPF | Feedback Portal

 

For your convenience, we have attached the video demonstration with the latest package for your reference.

 

Video demonstration: Please refer to the attachment. 

 

Issue Root Cause:

While selecting data from the combobox drop-down popup, adjacent cell values were hidden in the UI due to an incorrect floating cell calculation. To resolve this issue, the floating cell calculation has been suppressed when adjacent cells contain values during selection, ensuring that all cell values are displayed correctly.

 

Please feel free to reach out to us if you have any further questions or concerns.

 

Regards,

Raj Clinton G.


Attachment: Video_ac05ecb.zip

Loader.
Up arrow icon