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

CustomControlCell in multiple grids

I have multiple gridcontrols on a form. my customcontrolcell (DoubleUnitTextBoxCell) works without a hitch when used in a form having a single grid. I can have multiple doubleunittextboxcells in one grid without anyproblem. the behaviour of the doubleunittextboxcell is as follows when the cell has focus it shows the customcontrol and when it loses focus the GridStaticCellRenderer is called to drawtext to the cell. the problem arises when i have more than one grid in a form and i move focus between them. if the focus is on the DoubleUnitTExtBoxcell and the grids focus is lost the GridStaticCellRenderer drawtext method is not called. I am attaching code to my custom cell Regards Harsha DoubleUnitTextBoxCell_3004.zip DoubleUnitTextBoxCell_7842.zip

2 Replies

HA Harsha Alakeshwar November 16, 2004 02:53 PM UTC

I have noticed that the Grid.LostFocus event is not fired when the gridloses focus from my CustomControlCell though the event is fired when the grid loses focus from other cells. any suggestion would be of great help. Thank you, Harsha

AD Administrator Syncfusion Team November 16, 2004 10:04 PM UTC

I tried to set up a sample with your code, but could not because of unknown classes. Rgarding the focus issue, in your renderer class. try suuscribing to your control.LoadFocus event for your embedded control. In the handler, try calling: this.NotifyCurrentCellControlLostFocus(this.Control); You can see a sample of this in the GridCellRendererBase class.

Live Chat Icon For mobile
Up arrow icon