DataGrid Checkboxes Behaviour

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

    #1

    DataGrid Checkboxes Behaviour

    Has anyone tried this.

    Take any table in a database (ex. Customers Table in the Northwind
    database). and add a new column to it called test. let the data type of test
    be "bit".

    do a select * query on this new table and display the results in a DataGrid
    Control.

    You will see check boxes in the columns of this field. try clicking on these
    check boxes to check and uncheck a box. you will notice that it takes 2
    clicks to uncheck the box. on first click the cell turns gray
    and on the second click the box is actually gets unchecked. this behaviour
    is annoying as the box should change state in just one click.

    It will be very kind if someone tries to simulate what I have done and let
    me know if the same problem is occurring. Is this a bug... Can there be some
    workaround for this ?

    I'll be very gratefull for any help/comments
  • Oleg Zherebin

    #2
    Re: DataGrid Checkboxes Behaviour

    For one-click checkboxes you need to override OnMouseDown() routine of your
    grid

    "Nagabhusha n Ammu" <NagabhushanAmm u@discussions.m icrosoft.com> wrote in
    message news:DC60ECC7-DA22-4883-AD98-073EC49E7A9F@mi crosoft.com...[color=blue]
    > Has anyone tried this.
    >
    > Take any table in a database (ex. Customers Table in the Northwind
    > database). and add a new column to it called test. let the data type of[/color]
    test[color=blue]
    > be "bit".
    >
    > do a select * query on this new table and display the results in a[/color]
    DataGrid[color=blue]
    > Control.
    >
    > You will see check boxes in the columns of this field. try clicking on[/color]
    these[color=blue]
    > check boxes to check and uncheck a box. you will notice that it takes 2
    > clicks to uncheck the box. on first click the cell turns gray
    > and on the second click the box is actually gets unchecked. this behaviour
    > is annoying as the box should change state in just one click.
    >
    > It will be very kind if someone tries to simulate what I have done and let
    > me know if the same problem is occurring. Is this a bug... Can there be[/color]
    some[color=blue]
    > workaround for this ?
    >
    > I'll be very gratefull for any help/comments[/color]


    Comment

    Working...