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

GridCurrencyTextBox and ActivateCurrentCellBehavior set to DoubleClickOnCell

I have GDBG using ActivateCurrentCellBehavior set to DoubleClick. When you click on any GridCurrencyTextBox cell the cell itself is Activated and Enters in Edit Mode, intead of doing that when you Double Click. Is this an issue? I''m using 1.6.1.9 and VS2003.

6 Replies

AD Administrator Syncfusion Team December 10, 2003 07:00 PM UTC

Is there any work around to fix this. I created a derived cell renderer from GridCurrencyTextBoxRenderer. I played around the OnClick event but coud not accomplish what I wanted. Any recommendation? >I have GDBG using ActivateCurrentCellBehavior set to DoubleClick. >When you click on any GridCurrencyTextBox cell the cell itself is Activated and Enters in Edit Mode, intead of doing that when you Double Click. > >Is this an issue? > >I''m using 1.6.1.9 and VS2003. > >


AD Administrator Syncfusion Team December 10, 2003 07:28 PM UTC

Try this. In your derived renderer class, override OnInitialize. In your override, call the baseclass, and then call CurrentCell.EndEdit().


AD Administrator Syncfusion Team December 11, 2003 02:27 AM UTC

Working around OnInitialize and OnDoubleClick I was able to accomplish the editing part only when the user double click on the cell. Using the keyboard, when I move over any cell a thing border is drawn around the cell as an indication of current cell. For this particular case is not shown. Any ideas why? Thanks >Try this. > >In your derived renderer class, override OnInitialize. In your override, call the baseclass, and then call CurrentCell.EndEdit().


AD Administrator Syncfusion Team December 11, 2003 08:48 AM UTC

It is likely the Static drawing is being used to draw the cell in this case, and that does not draw the frame around the current cell. Here is a slightly different technique. It tries to handle things by only calling the base class in OnDraw if you want to edit things. At all other times, it just statically draws the text (and the Frame if needed). Maybe this will work for you


AD Administrator Syncfusion Team December 11, 2003 01:22 PM UTC

OK. Taking your example as reference I created a new Currency Cell. My Currency Cell is doing everything I want but drawing the frame. By overriding OnInitiliaze there is no call to BeginEdit(), so the cell will never get the focus. If you provide me with an easy way to set the focus (CurrentCell.Activate didn''t work) during OnInitialize my Currency Cell will behave like any other cell. >It is likely the Static drawing is being used to draw the cell in this case, and that does not draw the frame around the current cell. > >Here is a slightly different technique. It tries to handle things by only calling the base class in OnDraw if you want to edit things. At all other times, it just statically draws the text (and the Frame if needed). Maybe this will work for you > > > CurrencySample_8694.zip


AD Administrator Syncfusion Team December 11, 2003 04:51 PM UTC

Try changing your if(this.ShouldDrawFocused(rowIndex, colIndex)) to if (CurrentCell.RowIndex == rowIndex && CurrentCell.ColIndex == colIndex)

Loader.
Up arrow icon