Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. datagrid focus

datagrid focus

Scheduled Pinned Locked Moved C#
databasehelp
2 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    praveenkumar palla
    wrote on last edited by
    #1

    present functionality: on load the datagridview's selection mode is "FullRowSelect". on clicking "Rename" button i am changing the selection mode to "CellSelect"(only the column is editable) and selecting that cell of the selected row index and then double clicking on that cell we able type(cursor is focusing to that cell) the code is dgvLasers.EditingPanel.Visible = true; bEdit = true; dgvLasers.SelectionMode = DataGridViewSelectionMode.CellSelect; dgvLasers.Rows[intIndex].Cells[1].Selected = true; but a small change required on clicking "Rename" button only the cell shold be selected and cursor should be focused to that cell (i.e. without clicking on the cell we should able to type or replace the text) please help me on this Thanks in advance praveen Kumar palla

    N 1 Reply Last reply
    0
    • P praveenkumar palla

      present functionality: on load the datagridview's selection mode is "FullRowSelect". on clicking "Rename" button i am changing the selection mode to "CellSelect"(only the column is editable) and selecting that cell of the selected row index and then double clicking on that cell we able type(cursor is focusing to that cell) the code is dgvLasers.EditingPanel.Visible = true; bEdit = true; dgvLasers.SelectionMode = DataGridViewSelectionMode.CellSelect; dgvLasers.Rows[intIndex].Cells[1].Selected = true; but a small change required on clicking "Rename" button only the cell shold be selected and cursor should be focused to that cell (i.e. without clicking on the cell we should able to type or replace the text) please help me on this Thanks in advance praveen Kumar palla

      N Offline
      N Offline
      Nouman Bhatti
      wrote on last edited by
      #2

      set datagridview.readonly = false datagridview.editmode = editonenter then write your code

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups