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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to jump to a cell

Thread ID:

Created:

Updated:

Platform:

Replies:

67964 Sep 5,2007 03:47 PM UTC Sep 7,2007 10:14 AM UTC WinForms 6
loading
Tags: GridControl
Geoff Parker
Asked On September 5, 2007 03:47 PM UTC

I want to change the current cell to say col1 row 4, any ideas

Thanks
Geoff

Philip Bishop
Replied On September 5, 2007 04:11 PM UTC

This following will change the current cell to row2, col2....

grdAGCY_AR.CurrentCell.MoveTo(2, 2)

This next piece of code will do the same as above and scoll the cell in view if it wasn't in view.....

grdExpires.CurrentCell.MoveTo(2, 2, GridSetCurrentCellOptions.ScrollInView)

Philip Bishop
Replied On September 5, 2007 04:13 PM UTC

And where I had grdExpires for example this would be the name of your grid.

Geoff Parker
Replied On September 5, 2007 05:35 PM UTC

Thanks I dont know why but I read that in the documents as moving cell contents from one place to another.

Thanks
Geoff

Geoff Parker
Replied On September 6, 2007 07:42 AM UTC

Although the above code does work from a button it does not seem to work how I am trying to apply it.

When the user enters a value of x in column 2 I want to jump to column 5 and allow the user to type in a value in column five without clicking I have tried the below

Sub XXX() handles grid1control.currentcelleditingcomplete

curcell = grid1control.currentcell

if curcell.colindex = 2 then
if gridcontrol1(curcell.rowindex, 2) = "x"
gridcontrol1.currentcell.moveto(curcell.rowindex, 5)
End if
End If

Yhis does not move the current cell, any help welcome

Philip Bishop
Replied On September 6, 2007 03:47 PM UTC

This worked for me

Private Sub gc1_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles gc1.CurrentCellChanged
If gc1.CurrentCell.Renderer.ControlText = "x" Then
gc1.CurrentCell.MoveTo(1, 5)
End If

Geoff Parker
Replied On September 7, 2007 10:14 AM UTC

Philip Thanks I thanks work a treat

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.

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

;