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

Single-Click behavior on GridDataBoundGrid cell problem...

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)

3 Replies

ST stanleyj Syncfusion Team January 26, 2006 09:58 AM UTC

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


HM Hal McKinney January 26, 2006 04:53 PM UTC

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.


HM Hal McKinney January 26, 2006 05:27 PM UTC

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!

Loader.
Live Chat Icon For mobile
Up arrow icon