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 dropdown ListView control by inheriting from GridDropDownCellModel and GridDropDownCellRenderer classes. Everything works great except when I set the dropdown to exclusive mode. When a user selects an item from the dropdown and the dropdown closes, the celltext/cellvalue does not update until the user leaves the cell. I''ve overriden the dropdowncontainerclosedropdown sub, called the NotifyCurrentCellChanged and then invalidated the range. Am I missing something? Here is the sub I wrote:
Public Overrides Sub DropDownContainerCloseDropDown(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.PopupClosedEventArgs)
If (e.PopupCloseType = Syncfusion.Windows.Forms.PopupCloseType.Done) Then
If (Me.NotifyCurrentCellChanging()) Then
Me.ControlValue = Me._getSelectedCellsValue
Me.NotifyCurrentCellChanged()
End If
End If
Me.Grid.InvalidateRange(GridRangeInfo.Cell(Me.RowIndex, Me.ColIndex), GridRangeOptions.MergeCoveredCells)
MyBase.DropDownContainerCloseDropDown(sender, e)
End Sub
ADAdministrator Syncfusion Team October 12, 2004 06:22 PM UTC
Hi Ted,
try also setting ControlText to the display text (e.g. you could call Model.GetFormattedText to get that text and pass in ControlValue as value)
Let me know if you continue to have trouble.
Stefan
TETedOctober 13, 2004 11:28 AM UTC
>Hi Ted,
>
>try also setting ControlText to the display text (e.g. you could call Model.GetFormattedText to get that text and pass in ControlValue as value)
>
>Let me know if you continue to have trouble.
>
>Stefan
>
Tried it and it still doesn''t work.
TETedOctober 13, 2004 11:35 AM UTC
It''s weird. When i step thru in debugging, the ControlValue and ControlText have the new value I just selected from the listview, but the visible Cell doesn''t show it until you leave the cell.
TETedOctober 13, 2004 12:14 PM UTC
I think i may have solved the problem. I called
Me.CurrentCell.ConfirmChanges after the Me.NotifyCurrentCellChanged call. Is this OK?
ADAdministrator Syncfusion Team October 13, 2004 01:50 PM UTC
Calling ConfirmChanges should save the change to the grid without deactivating the currentcell. This should be OK I think.