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.
Unfortunately, activation email could not send to your email. Please try again.

GridCurrencyTextBox and ActivateCurrentCellBehavior set to DoubleClickOnCell

Thread ID:

Created:

Updated:

Platform:

Replies:

9213 Dec 10,2003 01:45 PM Dec 11,2003 11:51 AM Windows Forms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 10, 2003 01:45 PM

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.

Administrator [Syncfusion]
Replied On December 10, 2003 02:00 PM

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. > >

Administrator [Syncfusion]
Replied On December 10, 2003 02:28 PM

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

Administrator [Syncfusion]
Replied On December 10, 2003 09:27 PM

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().

Administrator [Syncfusion]
Replied On December 11, 2003 03:48 AM

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

Administrator [Syncfusion]
Replied On December 11, 2003 08:22 AM

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

Administrator [Syncfusion]
Replied On December 11, 2003 11:51 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;