We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridDropDownCellRenderer

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

5 Replies

AD Administrator Syncfusion Team October 12, 2004 02:22 PM

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


TE Ted October 13, 2004 07:28 AM

>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.


TE Ted October 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.


TE Ted October 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?


AD Administrator 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.

Loader.
Live Chat Icon For mobile
Up arrow icon