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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Single-Click behavior on GridDataBoundGrid cell problem...

Thread ID:





40112 Jan 25,2006 05:10 PM UTC Jan 26,2006 05:27 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On January 25, 2006 05:10 PM UTC

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

Hal McKinney
Replied On 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.

Hal McKinney
Replied On 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!


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon