Hi,
I have a RadGridView, a RadDomainDataSource, a RIA DomainService and a .NET EntityFramework Model from my SQL database. My grid works fine; it fetches the data and displays it in the grid as expected. The underlying table for this Entity contains a non-nullable timestamp field by the name "Modified". I don't want to show this field in the grid and so I did not create a grid column for it. When I press the Insert key, as expected, a new blank row is inserted in the grid. So far, so good. But after filling the column values, and I press tab key to lose focus from the row, I get an error saying "The 'Modified' field is required". How can I get rid of this error. In other words, how would I go about validating the data to elimiate the error message. Here is my XAML for the page. Please advise.
Thanks.
Babu.
I have a RadGridView, a RadDomainDataSource, a RIA DomainService and a .NET EntityFramework Model from my SQL database. My grid works fine; it fetches the data and displays it in the grid as expected. The underlying table for this Entity contains a non-nullable timestamp field by the name "Modified". I don't want to show this field in the grid and so I did not create a grid column for it. When I press the Insert key, as expected, a new blank row is inserted in the grid. So far, so good. But after filling the column values, and I press tab key to lose focus from the row, I get an error saying "The 'Modified' field is required". How can I get rid of this error. In other words, how would I go about validating the data to elimiate the error message. Here is my XAML for the page. Please advise.
<
UserControl
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"Library.Views.Contributors"
mc:Ignorable
=
"d"
d:DesignHeight
=
"500"
d:DesignWidth
=
"700"
xmlns:riaControls
=
"clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"
xmlns:my
=
"clr-namespace:Library.Web.Model"
xmlns:vm
=
"clr-namespace:Library.ViewModels"
xmlns:ds
=
"clr-namespace:Library.Web.Model"
>
<
UserControl.Resources
>
<
vm:ContributorListViewModel
x:Key
=
"ContributorsViewModel"
xmlns:vm
=
"clr-namespace:Library.ViewModels"
/>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"0.731*"
/>
<
ColumnDefinition
Width
=
"0.269*"
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"0.8*"
/>
<
RowDefinition
Height
=
"0.2*"
/>
</
Grid.RowDefinitions
>
<
telerik:RadDomainDataSource
x:Name
=
"ContributorDS"
QueryName
=
"GetContributors"
AutoLoad
=
"True"
PageSize
=
"10"
>
<
telerik:RadDomainDataSource.DomainContext
>
<
ds:LibraryDataDomainContext
/>
</
telerik:RadDomainDataSource.DomainContext
>
</
telerik:RadDomainDataSource
>
<
telerik:RadBusyIndicator
IsBusy
=
"{Binding IsBusy, ElementName=ContributorDS}"
>
<
telerik:RadGridView
Name
=
"rgContributors"
HorizontalAlignment
=
"Stretch"
ItemsSource
=
"{Binding DataView, ElementName=ContributorDS}"
IsBusy
=
"{Binding IsBusy, ElementName=ContributorDS}"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
x:Name
=
"PKId"
DataMemberBinding
=
"{Binding PKId}"
Header
=
"PKId"
UniqueName
=
"PKId"
IsVisible
=
"False"
/>
<
telerik:GridViewDataColumn
x:Name
=
"Name"
DataMemberBinding
=
"{Binding Name}"
UniqueName
=
"Name"
Width
=
"3*"
Header
=
"Name"
/>
<
telerik:GridViewDataColumn
x:Name
=
"Description"
DataMemberBinding
=
"{Binding Description}"
UniqueName
=
"Description"
Width
=
"6*"
Header
=
"Description"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
telerik:RadBusyIndicator
>
</
Grid
>
</
UserControl
>
Thanks.
Babu.