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 Sergey Alexandrovich Kryukov 485
1 Maciej Los 285
2 OriginalGriff 285
3 Peter Leow 260
4 John C Rayan 162
0 Sergey Alexandrovich Kryukov 7,203
1 OriginalGriff 5,587
2 Peter Leow 4,097
3 Mika Wendelius 2,850
4 CHill60 2,818


Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 4 Sep 2012
Copyright © CodeProject, 1999-2015
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