Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Silverlight4
Below is my code
 <toolkit:DataField FontWeight="SemiBold"  HorizontalAlignment="Left"      VerticalContentAlignment="Top">
        <toolkit:DataField.Label>
                <StackPanel Orientation="Horizontal" x:Name="stkpnl_labelStar">
                       <TextBlock x:Name="txtblk_labelstar" Text="*"  Foreground="Red"/>
                      <TextBlock x:Name="txtblk_label" Text="Label Name :" />
                </StackPanel>
        </toolkit:DataField.Label>
       <TextBox Text="{Binding label_name, Mode=TwoWay, NotifyOnValidationError=True, 
                ValidatesOnExceptions=True, UpdateSourceTrigger=Explicit}"  
                x:Name="txt_label_name" Width="200" HorizontalAlignment="Left" FontWeight="Normal"/>
</toolkit:DataField>
when i use above code for Dataform Datafield,and i want to open my dataform in Edit mode then i Got below Error:
"Value doesnot fall within expected range."
can any one help me.
Posted 4-Sep-12 3:14am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Are you using Entity Framework? If the answer is yes. You must search for your metadata file. And see your validation in the class.
Probably your problem is DataAnnotations.
 
Hope it helps
  Permalink  
Comments
prashant patil 4987 at 4-Sep-12 8:38am
   
no..m not using entity framework.
i am simply using datagrid and dataform. when m selecting Record from Datagrid then tat selected record should be open into dataform in edit mode.
But when m trying to open in edit mode then i got that perticcular error..
so.. what is my problem?
Christian Amado at 4-Sep-12 8:39am
   
Ok. How you fill the DataGrid with Data? DataTable, Object?
prashant patil 4987 at 5-Sep-12 0:09am
   
List<property class> obj = new List<property class> ();
obj.add(property class object);
Datagrid1.Itemsource = obj
Like this i fill my datagrid.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 490
1 Maciej Los 299
2 BillWoodruff 174
3 /\jmot 170
4 Suraj Sahoo | Coding Passion 150
0 OriginalGriff 8,484
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,639
3 Maciej Los 5,159
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 4 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100