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.
Unfortunately, activation email could not send to your email. Please try again.

GridDropDownCellRenderer

Thread ID:

Created:

Updated:

Platform:

Replies:

20220 Oct 12,2004 01:06 PM Oct 13,2004 09:50 AM Windows Forms 5
loading
Tags: GridControl
Ted
Asked On October 12, 2004 01:06 PM

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

Administrator [Syncfusion]
Replied On 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

Ted
Replied On 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.

Ted
Replied On 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.

Ted
Replied On 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?

Administrator [Syncfusion]
Replied On 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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;