Click here to Skip to main content
15,885,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below is my code
XML
 <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

1 solution

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
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900