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:
Data Validation Assignment: A cell is assigned a
DataValidationrule with a list of string options.User Selection: The user clicks the dropdown and selects a string (e.g., "Option A").
Event Trigger: The
ActiveGrid_CurrentCellValueChangedevent fires.Modification Logic: Inside the event, I process the
e.ControlTextthrough a custom method (ConvertToCellFropDropDown) to determine a new, different string (e.g., "Modified_Option_A").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
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
Hi Vadim,
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); } } |
Please let us know if you need any further assistance or clarification.
Attachment: SampleVideo_3aa594be.zip
Hello Raj,
Your implementation works as intended. I really appreciate your help and support
Regards
Hello Raj,
Attachment: Combobox_data_hidden_from_view_f85cfd70.png
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.
Raj Clinton G
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.
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
- 8 Replies
- 2 Participants
-
VA Vadim
- Feb 11, 2026 12:13 AM UTC
- Mar 31, 2026 07:03 AM UTC