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.Grid.InvalidateRange(GridRangeInfo.Cell(Me.RowIndex, Me.ColIndex), GridRangeOptions.MergeCoveredCells)
ADAdministrator Syncfusion Team October 12, 2004 02:22 PM
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.
TETedOctober 13, 2004 07:28 AM
>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.
Tried it and it still doesn''t work.
TETedOctober 13, 2004 07:35 AM
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 08:14 AM
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 09:50 AM
Calling ConfirmChanges should save the change to the grid without deactivating the currentcell. This should be OK I think.