Keeping Cells from getting Focus?

Discussion in 'ASP .Net Datagrid Control' started by Josh Grameson, May 9, 2006.

  1. I have a datagridview with some row that I want only to display. Which is
    fine cause I make them readonly. But I would like that you can't land in
    those cells as well. Is this possible?
     
    Josh Grameson, May 9, 2006
    #1
    1. Advertising

  2. A control with an tabindex value of minus one (-1) is passed over in the tab
    sequence.

    Is there a way you can put this in as an attribute for the control?

    tabindex="-1"

    "Josh Grameson" <> wrote in message
    news:6LQ7g.164283$...
    >I have a datagridview with some row that I want only to display. Which is
    >fine cause I make them readonly. But I would like that you can't land in
    >those cells as well. Is this possible?
    >
     
    Ken Cox - Microsoft MVP, May 9, 2006
    #2
    1. Advertising

  3. I understand that each control has a tabindex. But in this case wouldn't the
    control be the DataGridView itself, not the individual cells? I don't want
    to avoid focus to any of the DataGridView cells but to certain columns.


    "Ken Cox - Microsoft MVP" <> wrote in message
    news:...
    >A control with an tabindex value of minus one (-1) is passed over in the
    >tab sequence.
    >
    > Is there a way you can put this in as an attribute for the control?
    >
    > tabindex="-1"
    >
    > "Josh Grameson" <> wrote in message
    > news:6LQ7g.164283$...
    >>I have a datagridview with some row that I want only to display. Which is
    >>fine cause I make them readonly. But I would like that you can't land in
    >>those cells as well. Is this possible?
    >>

    >
    >
     
    Josh Grameson, May 9, 2006
    #3
  4. You heed to handle either ItemDataBound or PreRender event. In the event
    handler you can access individual rows and their cells. Set Enabled=false
    for the cells you want to disable.

    Eliyahu

    "Josh Grameson" <> wrote in message
    news:6LQ7g.164283$...
    >I have a datagridview with some row that I want only to display. Which is
    >fine cause I make them readonly. But I would like that you can't land in
    >those cells as well. Is this possible?
    >
     
    Eliyahu Goldin, May 9, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    564
  2. William McBrine
    Replies:
    0
    Views:
    322
    William McBrine
    May 28, 2008
  3. Joel Finkel

    Cells[].Text or Cells[].Controls[0]

    Joel Finkel, Sep 1, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    347
    Joel Finkel
    Sep 1, 2003
  4. Replies:
    6
    Views:
    123
    Randy Webb
    May 30, 2006
  5. Roger
    Replies:
    3
    Views:
    380
Loading...

Share This Page