Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Datagrid Validation on click of a button out side the d... RSS

1 reply

Last post Aug 03, 2009 02:22 AM by Mog Liang - MSFT

(0)
  • Datagrid Validation on click of a button out side the datagrid.

    Jul 27, 2009 11:53 AM | LINK

    Hi,

    The below is my requirement.

    Iam loading the data in a datagrid via MVVM. Datagrid autogeneratecolumn is set to false and i have atleast 5 rows of data.

    User can edit / change the data in the datagrid.

    I have one button control on the screen, on click of which i need to update the edited / changed data in MVVM object.

    While doing os i need to report any validation error s for say , email, string . number and length of the text etc.

    How to achieve this?

    with regards

     

    Silverlight MVVM Datagrid Validations

  • Mog Liang - MSFT

    Mog Liang -...

    All-Star

    21645 Points

    2132 Posts

    Microsoft

    Re: Datagrid Validation on click of a button out side the datagrid.

    Aug 03, 2009 02:22 AM | LINK

    Hi,

    Refer to this article http://msdn.microsoft.com/en-us/library/dd901590(VS.95).aspx

    Currently, DataGrid(and dataform) is the only control that automatically applies validation attributes. so, If you want to apply validation manually, you could use any control except datagrid and follow the article to implement validation.

    Thanks,

    Mog Liang
    Microsoft Online Community Support

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.