locked
Silverlight 4: Datagrid validation for each row with custom validation RRS feed

  • General discussion

  • Hi Folks,

    I  have a datagrid with grouping & totaling. Below is the sample for your reference,

    Title

    Value 1

    Value 2

    Total of Items(Value1 + Value2)

    Items A -1

     

     

    5

    Items A -2

     

     

    6

    Total Items A

     

     

    9

    Items B -1

     

     

    4

    Items B -2

     

     

    5

    Total Items B

     

     

    8

     

    When there is a change in the collection, InotifyPropertyChnaged event will be fired to updated total of that particular group. Now What i have to do ->

    1. I will enter the value for "Total of Items (Bold one)" in the database & make the last column as read-only.

    2. Now the user has to update the columns "Volume 1" & " Volume 2" based on Total of Items. Lets assume the total of items value is 6, then the user will be allowed to values like below combination,

    Value 1 = 3 & Value = 2..

    Value 1 = 7 & Value = -2

    On Clicking on save button , I have to do the validation for all the rows (Each row)..  Currently if i change any values, immediatly notifyevent handler is firing, So i want to do the validation & calculation  for the selected & all the rows.

    How do i do the validation / Custom validation.

    Please drop me a message, if any clarification.

    Thanks!

     

    Wednesday, March 28, 2012 12:56 PM

All replies