Validate code in cell and values other cells

3 posts, 0 answers
  1. Dario Concilio
    Dario Concilio avatar
    129 posts
    Member since:
    Apr 2016

    Posted 31 Aug Link to this post

    Hi forum,

    I would user gridview for lines of document.

    The line has several field: Line No., Item No., Description, Unit Price and so on.

    The user should edit Item No. field, after validate Item No.,

    it should search Item from database and it values to description and Unit Price fields in this line.

    What is the better way to accomplish this?

    What event should I check to get Item No. Code and values other cells of current row?

  2. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 01 Sep Link to this post

    Hello Dario,

    Thank you for writing. 

    RadGridView provides a convenient way to perform validation before data is committed to the underlying data source. You can validate data by handling CellValidating event which is raised by RadGridView when the current cell changes or when the cell loses input focus (when pressing Enter key). Canceling this event prevents the user from exiting the cell until a valid editor value is entered or the edit process is canceled. In the event handler you can access to the row and to other cells by the Row.Cells property.The RowValidating event can be used the same way to prevent the user from exiting the current row. Additional information is available here: http://docs.telerik.com/devtools/winforms/gridview/editors/data-validation

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik by Progress
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Dario Concilio
    Dario Concilio avatar
    129 posts
    Member since:
    Apr 2016

    Posted 01 Sep in reply to Dess Link to this post

    thanks, you were crystalline!
Back to Top