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 09:13 AM UTC

> 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 09:16 AM UTC

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 09:39 AM UTC

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


AD Administrator Syncfusion Team March 31, 2003 12:18 PM UTC

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


PE Peter April 1, 2003 04:54 AM UTC

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


PE Peter April 3, 2003 10:25 AM UTC

Hi, did you get the problem too?


AD Administrator Syncfusion Team April 3, 2003 12:28 PM UTC

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


AD Administrator Syncfusion Team April 3, 2003 12:39 PM UTC

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 4, 2003 04:06 AM UTC

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


AD Administrator Syncfusion Team April 4, 2003 06:23 AM UTC

Courtesy of Stefan. :)

Loader.
Live Chat Icon For mobile
Up arrow icon