The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I''ve created a drop down combo box model and renderer for a custom combo box that we''re using.
For some reason, it appears to have trouble saving the value. I have a checkbox that works in the same way that doesn''t have this problem and I can''t figure it out.
I handle the SelectedIndexChanged event in the renderer as follows:
private void EditComboBoxSelectedIndexChanged(object sender, System.EventArgs e)
{
// We need to ignore the messages we get while drawing is taking place.
if (inDraw_)
{
return;
}
if (base.NotifyCurrentCellChanging())
{
MozartGrid grid = this.Grid as MozartGrid;
GridStyleInfo style = grid[grid.CurrentCell.RowIndex, grid.CurrentCell.ColIndex];
style.CellValue = editComboBox_.SelectedValue;
base.NotifyCurrentCellChanged();
}
}
I also tried simply setting ControlValue = editComboBox_.SelectedValue, but I wasn''t entirely sure which was the best way to go. Either way produces the same result.
After changing the selection in the combo box, when the OnDraw comes around, the CellValue is set to an empty string, not the value that that was placed into the style in the SelectedIndexChanged event. I have no other place in my code that "should" be modifying the value, though I''m certainly open to that possibility. I was just hoping maybe the above code might be the culprit and you guys may see where I''m screwing up.
Thanks.