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 have implemented the DateTimePickerCell Custom cell type for my GridGroupingControl (C:\Program Files\Syncfusion\Essential Studio\5.1.0.51\Windows\Grid.Windows\Samples\2.0\CustomCellTypes\DateTimePickerCells\sample.htm). Whenever I change the value, I get the following exception:
System.InvalidOperationException was unhandled by user code Message="AddNew not called" Source="Syncfusion.Grouping.Base" StackTrace: at Syncfusion.Grouping.AddNewRecord.SetValue(FieldDescriptor fieldDescriptor, Object value) at Syncfusion.Windows.Forms.Grid.Grouping.GridAddNewRecord.Syncfusion.Windows.Forms.Grid.Grouping.IGridTableCellStyleChanged.RaiseTableCellStyleChanged(GridTableCellStyleInfoEventArgs e) at Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoIdentity.OnStyleChanged(StyleInfoBase style, StyleInfoProperty sip) at Syncfusion.Styles.StyleInfoBase.OnStyleChanged(StyleInfoProperty sip) at Syncfusion.Windows.Forms.Grid.GridStyleInfo.OnStyleChanged(StyleInfoProperty sip) at Syncfusion.Styles.StyleInfoBase.SetValue(StyleInfoProperty sip, Object value) at Syncfusion.Windows.Forms.Grid.GridStyleInfo.set_CellValue(Object value) at Transpower.SAD.CommonControls.DateTimeCellRenderer.OnSaveChanges() in C:\SourceCode\MS\SAD\CommonControls\GridLogic\DatePickerCell.vb:line 78 at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges(Boolean closeDropDown)
The exception occurs in this routine:
Protected Overrides Function OnSaveChanges() As Boolean If CurrentCell.IsModified Then Grid.Focus() Dim style As GridStyleInfo = Grid.Model(Me.RowIndex, Me.ColIndex) style.CellValue = Me.dateTimePicker.Value
ADAdministrator Syncfusion Team December 11, 2007 10:30 AM UTC
In the renderer code, try changing the datePicker_ValueChange handler to Private Sub datePicker_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) If CurrentCell.NotifyChanging() Then CurrentCell.IsModified = True CurrentCell.NotifyChanged() End If End Sub