try abc

try abc

  • 1.4k
  • 306
  • 486.9k

cannot commit or quit a cell value change.

Feb 19 2011 12:32 AM
Hello ,

    I have datagridview in which i am assigning datasource through query.
    in that one column - Quantity is editable & its Format is set  0.00 from cellformating event.
    Now if user delete any value & direct click on Cancel Button then it gives error as below.

    "Operation did not succeed because the program cannot commit or quit a cell value change."
   
    In Cancel Record we have to call FillGrid()  in which first line code is as below ,

    dgv.Datasource = null  

    In above line it throws error.

    Also We have used _CellValidating Event in which we are checking whether user has entered proper value or not.

    Thanks in Advance for help

    Regards,
    Developer

Answers (1)