datagrid column tabbing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Doug

    #1

    datagrid column tabbing

    Hello,

    I have a datagrid with 3 columns,
    however when i tab between the cells, I do not want to make the 3rd column
    tabbed.
    so it immediately jumps to the 1st column of the next row.

    Is there anyway to do this?

    Thanks,

    Doug


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: datagrid column tabbing

    Doug,

    You would probably have to derive a class from the DataGrid control and
    override the WndProc method so that you process the tab key (or even the
    PreProcessMessa ge method as well). Once you catch the tab key and figure
    out which cell you are on, you can determine the action to take.

    Also, you might have to do processing like this in a class that
    implements IMessageFilter and is registered with the static AddMessageFilte r
    method on the Application class, so that you get first crack on the message
    before the parent of the data grid processes (like the form, and determining
    that the control should be tabbed).

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nicholas.paldin o@exisconsultin g.com

    "Doug" <douglas.chan@f lytxt.com> wrote in message
    news:u$gm5B6cDH A.2416@TK2MSFTN GP10.phx.gbl...[color=blue]
    > Hello,
    >
    > I have a datagrid with 3 columns,
    > however when i tab between the cells, I do not want to make the 3rd column
    > tabbed.
    > so it immediately jumps to the 1st column of the next row.
    >
    > Is there anyway to do this?
    >
    > Thanks,
    >
    > Doug
    >
    >[/color]


    Comment

    Working...