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.

Single-Click behavior on GridDataBoundGrid cell problem...

Thread ID:

Created:

Updated:

Platform:

Replies:

40112 Jan 25,2006 12:10 PM Jan 26,2006 12:27 PM Windows Forms 3
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 25, 2006 12:10 PM

Hello, I have a GDBGrid with a (textbox) column defined as follows: Dim gridBoundColumnBidAdjustment As New Syncfusion.Windows.Forms.Grid.GridBoundColumn Me.GridDataBoundGridIndex.GridBoundColumns.Add(gridBoundColumnBidAdjustment) gridBoundColumnBidAdjustment.HeaderText = "Bid Adj" gridBoundColumnBidAdjustment.MappingName = "BidAdjustment" gridBoundColumnBidAdjustment.StyleInfo.CellValueType = GetType(Decimal) gridBoundColumnBidAdjustment.StyleInfo.Format = "#,##0.00###" gridBoundColumnBidAdjustment.StyleInfo.HorizontalAlignment = Syncfusion.Windows.Forms.Grid.GridHorizontalAlignment.Right Me.GridDataBoundGridIndex.Model.ColWidths(4) = 50 When (single)clicking a cell in this column, it will place the cursor (briefly) whereever in the existing text I happened to click then immediately move the cursor all the way to the left side of the text (so that if I type anything it is inserted in front of existing text in that cell). I need it to act more like excel such that a single click to a cell in this column selects the whole cell so that if I start typing it will REPLACE the contents (instead of INSERTing in front of)

stanleyj [Syncfusion]
Replied On January 26, 2006 04:58 AM

Hi Hal, Try setting ActivateCurrentCellBehavior and see if that could help. Me.gridDataBoundGrid1.Model.Options.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll Also refer this thread, if you need to replace character by character instead of insertion. Best regards, Stanley

Hal McKinney
Replied On January 26, 2006 11:53 AM

Your idea normally would work, but I have realtime data populating this grid continuously and every time I repopulate any cell I refresh the whole grid. It''s the grid.REFRESH that''s causing my problem. Every time refresh is called, if I''m in the middle of editing a cell, it deselects whatever text that was selected in my current cell and moves the cursor to the left of text in current cell. Any ideas? Thanks.

Hal McKinney
Replied On January 26, 2006 12:27 PM

Good News... I think I figured it out... I discovered the RefreshRange method and it seems to be doing the trick: Me.GridDataBoundGrid1.RefreshRange(Syncfusion.Windows.Forms.Grid.GridRangeInfo.Cols(6, 14)) Thanks for your help anyway!

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.

;