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

Current cell not selecting all the text

Hi, I am using DataBoundGrid I have set the ActivateCurrentCellBehavior as SelectAll. I wrote a custom cell ("LookupCell") derived from GridTextBoxCellModel/Renderer. It has a button at the end of the textfield. When I click inside this lookup cell it was not highliting the text. So, in renderer.OnClick(), I am forcing to TextBox.Focus() and TextBox.SelectAll(). In renderer.OnClick() override, TextBox is not getting focus sometimes (???). When I move from one row to another row, my non-lookup cell texts are not getting selected with single click. I have to click again to make the other cells active. If I don''t do that, what ever I type is going to the previous (current) cell and not present current cell. I tried to reproduce this in a simple example. It seems to be working ok in that. How can I track this bug and what do I need to look? thanks, - Reddy

1 Reply

AD Administrator Syncfusion Team January 22, 2004 09:41 PM UTC

Some things to look at. The standard TextBox cell does its selectall code for the ActivateCurrentCellBehavior = SelectAll in TextBoxGotFocus. This method is a handler for TextBoxControl.GotFocus event. It is hooked in the renderer''s constructor. Does your constructor call the base constructor to hook this event? Have you overriden the TextBoxGotFocus method. In your OnClick override, do you call the baseclass?

Live Chat Icon For mobile
Up arrow icon