Data Grid View Cell Focus
  • if you want to focus the editable cell in data grid view means just try this code it will help your valuable code
     if (StaffGridView.CurrentCell.ColumnIndex < 5 || StaffGridView.CurrentCell.ColumnIndex==8)
                {
                    if (StaffGridView.CurrentCell.ReadOnly == true)
                        SendKeys.Send("{Tab}");
                }

  • 9 Comments sorted by
  • if any good codes plz send it 
  • i didn't get you, what is your desire kindly brief it ?
  • in my grid i have 7 columns but i have to enter the value in the middle of 4 columns 
    if i click the enter key it focus only that middle of 4 columns 
    i hope now u get my point 

  • did you mean that just focus on those column which's Editable or ReadOnly is false?
  • i think your code is easy
  • s that's y i am telling waqas then plz accept my answer
  • Vote Up0Vote Down WaqasWaqas
    172.00 Karma Accepted Answer
    i don't have accept option because just asker can accept and here asker is you.
  • thank you for your information

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative