Home Forums WinForms controls Xceed Grid for WinForms How to set cell value to arbitrary value if validation fails

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15121 |

    Hi,

    I am new to XCeed Grid for .NET

    In the cell’s LeavingEdit and ValidationError events, how can you set the cell value to an arbitrary value if validation fails ?

    Further, is it possible to set any arbitrary value by keeping the cell in edit mode, and also by ending the edit mode ?

    Thanks.

    Imported from legacy forums. Posted by Rajesh (had 1781 views)

    User (Old forums)
    Member
    Post count: 23064

    You can cast the sender to the cell, and use it to set the value, whether you stay in edit mode or leave it.

    Cell cell = ( Cell )sender;
    cell.Value = “value”;

    You can also use the e.NewValue, if you leave the edit mode but want to change the value.

    Imported from legacy forums. Posted by André (had 2910 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.