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

Derived Cell Style

In the sample GridDataBoundImageCell there is a drop down box which shows an image. I created - based on the sample - an own celltype which shows images as combobox items. Now if I show the "listboxpart" of the combobox (or the picturebox in the sample) the whole application gets "inactive" (shown with the inactive title bar). How can I fix that problem?

10 Replies

AD Administrator Syncfusion Team March 31, 2003 04:13 AM

> In the sample GridDataBoundImageCell there is a drop down box which shows an image. I created - based on the sample - an own celltype which shows images as combobox items. Now if I show the "listboxpart" of the combobox (or the picturebox in the sample) the whole application gets "inactive" (shown with the inactive title bar). How can I fix that problem?


AD Administrator Syncfusion Team March 31, 2003 04:16 AM

If you are dropping a ListBox, try using a GridComboBoxListBoxPart instead. This calss is derived from ListBox, but can be dropped without gaining input focus. It overrides WndProc to avoid the mouse activation. If you have the source code you can see how it avoids gaining focus.


PE Peter March 31, 2003 04:39 AM

I am deriving the list box from GridComboBoxListBoxPart. Same behaviour.


AD Administrator Syncfusion Team March 31, 2003 07:18 AM

Can you attach a sample project showing the problem? What version of the grid are you using, 1.5.2.0?


PE Peter March 31, 2003 11:54 PM

I attached a sample showing you the problem an yes, I'm using 1.5.2.0.


PE Peter April 3, 2003 05:25 AM

Hi, did you get the problem too?


AD Administrator Syncfusion Team April 3, 2003 07:28 AM

Yes we do see the problem. We will get back to you when we have a suggestion.


AD Administrator Syncfusion Team April 3, 2003 07:39 AM

Iy our GridImageBoxCellRenderer class, try adding this override.
Public Overrides Sub DropDownContainerShowedDropDown(ByVal sender As Object, ByVal e As System.EventArgs)
        Me.DropDownContainer.FocusParent()
        'MyBase.DropDownContainerShowedDropDown(sender, e)
End Sub
The point is not to call the base class as that is what is setting focus to the chicl control.


PE Peter April 3, 2003 11:06 PM

You did it. It works. Thanx very much Clay Peter


AD Administrator Syncfusion Team April 4, 2003 01:23 AM

Courtesy of Stefan. :)

Loader.
Live Chat Icon For mobile
Up arrow icon