Click here to Skip to main content
12,822,050 members (40,278 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Silverlight4
Below is my code
 <toolkit:DataField FontWeight="SemiBold"  HorizontalAlignment="Left"      VerticalContentAlignment="Top">
                <StackPanel Orientation="Horizontal" x:Name="stkpnl_labelStar">
                       <TextBlock x:Name="txtblk_labelstar" Text="*"  Foreground="Red"/>
                      <TextBlock x:Name="txtblk_label" Text="Label Name :" />
       <TextBox Text="{Binding label_name, Mode=TwoWay, NotifyOnValidationError=True, 
                ValidatesOnExceptions=True, UpdateSourceTrigger=Explicit}"  
                x:Name="txt_label_name" Width="200" HorizontalAlignment="Left" FontWeight="Normal"/>

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
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
prashant patil 4987 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 4-Sep-12 8:39am
Ok. How you fill the DataGrid with Data? DataTable, Object?
prashant patil 4987 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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 4 Sep 2012
Copyright © CodeProject, 1999-2017
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