Hi Team,
I joined the project attaching Telerik.2020.2.617.45 version.
but I can download only 2023.xx version.
So How can i download 2020.2.617.45 version.
Hello, I have upgraded application to .Net 6.0 ,while I trying to add DLL to toolbar then it gives following error [refer screenshot].
when I run the project it throws exception about Telerik, as
The invocation of the constructor on type 'Telerik.Windows.Controls.RadMenu' that matches the specified binding constraints threw an exception
following inner exception
" TypeInitializationException: The type initializer for 'Telerik.Windows.Controls.TelerikLicense' threw an exception."
and
"MissingMethodException: Method not found: 'System.ActivationContext System.AppDomain.get_ActivationContext()'."
please suggest.
Hello. I have a database on MS SQL Server 2014 Express LocalDB. Lets call this database 'My_Db'. My_Db database has the folowing hierarchy: highest-level master table called 'Devices' has 'Id' field that is primary key. Devices table has one detail table called 'SavedSessions" which has 'Id' field that is primary key and 'Devices_Id' field that is foreign key referenced to Devices.Id field. SavedSesions table has (in its turn) two detail tables: SavedSessionEventLogs and SavedSessionRegisters. Each one of this last two tables has 'SavedSessions_Id' field which is foreign key referenced to SavedSessions.Id field. In my client WPF MVVM application I need to display these four tables in master/detail hierarchy but this herarchy must not be nested. So each of this table must be displayed in its own grid (for example RadGridView). So if I select record in Device table' grid then content of SavedSession table' grid must be accordingly changed and the first record must be selected there. This accordingly entails the appropriate changing of content of SavedSessionEventLogs and SavedSessionRegisters tables. I want to build this master/detail view using QueryableEntityCollectionView and four instance of RadGridView. I had browsed many appropriate information in Google but not found any useful information. So I'll be very grateful if you give me an example of such an application.
First part of this question: is this control still supported? I ask because according to http://docs.telerik.com/devtools/wpf/controls/radentityframeworkdatasource/entityframework-changes there hasn't been an update since 2013, yet Entity Framework itself has been updated multiple times since then.
The real question is: how to use this with Entity Framework 6.1?
When trying to use this control, I get this at runtime:
Exception thrown: 'System.MissingMethodException' in Telerik.Windows.Controls.EntityFramework.dll
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>Log Manager.vshost.exe</AppDomain><Exception><ExceptionType>System.MissingMethodException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Method not found: 'System.Data.Objects.ObjectContext System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()'.</Message><StackTrace> at Telerik.Windows.Controls.RadEntityFrameworkDataSource.get_EffectiveObjectContext()
I'm setting the DbContext like this: this.logsSource.DbContext = this.context;
According to http://www.telerik.com/forums/objectcontext-vs-dbcontext the DbContext property just calls ((System.Data.Entity.Infrastructure.IObjectContextAdapter)this.DbContext).ObjectContext;
But I don't think that's correct, as I've tried doing the same thing myself and setting the ObjectContext property, but that property insists that ObjectContext come from System.Data.Objects, so the above line would never work.
So I'm confused, and looking for suggestions, please.
"The property 'Id' is part of the object's key information and cannot be modified."
XAML-Code (DataGrid):
01.
<
telerik:RadEntityFrameworkDataSource
Name
=
"DocumentTitlesDataSource"
QueryName
=
"DocumentTitles"
>
02.
</
telerik:RadEntityFrameworkDataSource
>
03.
04.
<
telerik:RadGridView
x:Name
=
"Entries"
Grid.Row
=
"1"
05.
ItemsSource
=
"{Binding DataView, ElementName=DocumentTitlesDataSource}"
06.
SelectedItem
=
"{Binding DataView.CurrentItem, Mode=OneWay, ElementName=DocumentTitlesDataSource}"
07.
SelectionMode
=
"Single"
08.
IsReadOnly
=
"True"
09.
AutoGenerateColumns
=
"False"
10.
IsSynchronizedWithCurrentItem
=
"True"
11.
CanUserDeleteRows
=
"False"
12.
CanUserFreezeColumns
=
"False"
13.
CanUserInsertRows
=
"False"
14.
CanUserReorderColumns
=
"False"
15.
CanUserResizeColumns
=
"False"
16.
CanUserSortColumns
=
"False"
17.
CanUserSortGroups
=
"False"
18.
IsFilteringAllowed
=
"False"
19.
ShowGroupPanel
=
"False"
20.
ShowColumnHeaders
=
"False"
SelectionChanging
=
"Entries_SelectionChanging"
>
21.
<
telerik:RadGridView.Columns
>
22.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Id}"
Header
=
"Id"
Width
=
"20"
IsVisible
=
"False"
/>
23.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding User.Id}"
Header
=
"Benutzer"
Width
=
"10"
IsVisible
=
"False"
/>
24.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Computer}"
Header
=
"Computer"
Width
=
"10"
IsVisible
=
"False"
/>
25.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"Dokumententitel"
Width
=
"*"
/>
26.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Group.Id}"
Header
=
"Dokumentengruppe"
Width
=
"200"
/>
27.
<
telerik:GridViewComboBoxColumn
x:Name
=
"cbxDocumentTitleGroup"
DataMemberBinding
=
"{Binding Group.Id}"
28.
DisplayMemberPath
=
"Name"
29.
SelectedValueMemberPath
=
"Id"
30.
Header
=
"Dokumentengruppe"
31.
Width
=
"100"
/>
32.
<
telerik:GridViewComboBoxColumn
x:Name
=
"cbxDocumentTitleType"
DataMemberBinding
=
"{Binding Type.Id}"
33.
DisplayMemberPath
=
"Name"
34.
SelectedValueMemberPath
=
"Id"
35.
Header
=
"Dokumententyp"
36.
Width
=
"100"
/>
37.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding System}"
Header
=
"System"
Width
=
"10"
IsVisible
=
"False"
/>
38.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Locked}"
Header
=
"Gesperrt"
Width
=
"10"
IsVisible
=
"False"
/>
39.
</
telerik:RadGridView.Columns
>
40.
</
telerik:RadGridView
>
XAML-Code (DataForm):
01.
<
Grid.Resources
>
02.
<
DataTemplate
x:Key
=
"WriteTemplate"
>
03.
<
Grid
>
04.
<
Grid.ColumnDefinitions
>
05.
<
ColumnDefinition
Width
=
"150"
></
ColumnDefinition
>
06.
<
ColumnDefinition
Width
=
"*"
></
ColumnDefinition
>
07.
</
Grid.ColumnDefinitions
>
08.
<
Grid.RowDefinitions
>
09.
<
RowDefinition
></
RowDefinition
>
10.
<
RowDefinition
></
RowDefinition
>
11.
<
RowDefinition
></
RowDefinition
>
12.
<
RowDefinition
></
RowDefinition
>
13.
<
RowDefinition
></
RowDefinition
>
14.
</
Grid.RowDefinitions
>
15.
<
Label
Grid.Row
=
"0"
Grid.Column
=
"0"
Margin
=
"0,5,0,0"
>Dokumententitel:</
Label
>
16.
<
Label
Grid.Row
=
"1"
Grid.Column
=
"0"
Margin
=
"0,5,0,0"
>Dokumentengruppe:</
Label
>
17.
<
Label
Grid.Row
=
"2"
Grid.Column
=
"0"
Margin
=
"0,5,0,0"
>Dokumententyp:</
Label
>
18.
<
Label
Grid.Row
=
"3"
Grid.Column
=
"0"
Margin
=
"0,5,0,0"
>Gesperrt:</
Label
>
19.
<
Label
Grid.Row
=
"4"
Grid.Column
=
"0"
Margin
=
"0,5,0,0"
>Systemeintrag:</
Label
>
20.
<
telerik:DataFormDataField
Grid.Row
=
"0"
Grid.Column
=
"1"
DataMemberBinding
=
"{Binding Name , Mode=TwoWay}"
HorizontalAlignment
=
"Stretch"
LabelPosition
=
"Above"
Margin
=
"0,5,0,0"
/>
21.
<
telerik:DataFormComboBoxField
Grid.Row
=
"1"
Grid.Column
=
"1"
HorizontalAlignment
=
"Stretch"
LabelPosition
=
"Above"
Margin
=
"0,5,0,0"
22.
ItemsSource
=
"{Binding ItemsSource, ElementName=cbxDocumentTitleGroup, Mode=TwoWay}"
23.
DataMemberBinding
=
"{Binding Group.Id}"
24.
DisplayMemberPath
=
"Name"
25.
SelectedValuePath
=
"Id"
26.
SelectedIndex
=
"{Binding Group}"
/>
27.
<
telerik:DataFormComboBoxField
Grid.Row
=
"2"
Grid.Column
=
"1"
HorizontalAlignment
=
"Stretch"
LabelPosition
=
"Above"
Margin
=
"0,5,0,0"
28.
ItemsSource
=
"{Binding ItemsSource, ElementName=cbxDocumentTitleType}"
29.
DataMemberBinding
=
"{Binding Type.Id}"
30.
DisplayMemberPath
=
"Name"
31.
SelectedValuePath
=
"Id"
32.
SelectedIndex
=
"{Binding Type}"
/>
33.
<
telerik:DataFormCheckBoxField
Grid.Row
=
"3"
Grid.Column
=
"1"
DataMemberBinding
=
"{Binding Locked , Mode=TwoWay}"
HorizontalAlignment
=
"Stretch"
LabelPosition
=
"Above"
Margin
=
"0,5,0,0"
/>
34.
<
telerik:DataFormCheckBoxField
Grid.Row
=
"4"
Grid.Column
=
"1"
IsReadOnly
=
"True"
DataMemberBinding
=
"{Binding System , Mode=TwoWay}"
HorizontalAlignment
=
"Stretch"
LabelPosition
=
"Above"
Margin
=
"0,5,0,0"
/>
35.
</
Grid
>
36.
</
DataTemplate
>
37.
</
Grid.Resources
>
38.
39.
<
telerik:RadDataForm
x:Name
=
"EntryDetails"
Grid.Row
=
"2"
Header
=
"Dokumententitel"
40.
CommandButtonsVisibility
=
"Cancel, Commit"
AutoGenerateFields
=
"False"
AutoCommit
=
"False"
41.
EditEnding
=
"EntryDetails_EditEnding"
ValidatingItem
=
"EntryDetails_ValidatingItem"
EditEnded
=
"EntryDetails_EditEnded"
42.
ReadOnlyTemplate
=
"{StaticResource ReadTemplate}"
43.
EditTemplate
=
"{StaticResource WriteTemplate}"
44.
NewItemTemplate
=
"{StaticResource WriteTemplate}"
45.
ItemsSource
=
"{Binding DataView, ElementName=DocumentTitlesDataSource}"
/>
C# Code:
01.
public DocimpDocumentTitles(VIMANTO.Environment My)
02.
{
03.
InitializeComponent();
04.
my = My;
05.
db.Database.Connection.ConnectionString = my.CurrentConnection.GetSqlConntectionString();
06.
DocumentTitlesDataSource.DbContext = db;
07.
08.
ObservableCollection<
CatalogEntry
> documentTitleGroups = new ObservableCollection<
CatalogEntry
>();
09.
ObservableCollection<
CatalogEntry
> documentTitleTypes = new ObservableCollection<
CatalogEntry
>();
10.
11.
documentTitleGroups = Database.Views.CatalogViews.GetCatalogEntries(my.CurrentConnection, VIMANTO.Database.Views.CatalogViews.GetCatalog(my.CurrentConnection, "Dokumentengruppen").Id, true);
12.
cbxDocumentTitleGroup.ItemsSource = documentTitleGroups;
13.
14.
documentTitleTypes = Database.Views.CatalogViews.GetCatalogEntries(my.CurrentConnection, VIMANTO.Database.Views.CatalogViews.GetCatalog(my.CurrentConnection, "Dokumententypen").Id, true);
15.
cbxDocumentTitleType.ItemsSource = documentTitleTypes;
16.
}
Hi,
I have RadGridView binded to QueryableEntityCollectionView. I want to sort only items on current page by click on column header, not full data from server.
I was trying to sort items in GridView_Sorting event, set e.NewSortingState and e.Cancel = true but without any success. Can't access and sort items from current page.
Any help?
In the XAML-File the DataSorce created. Data displayed in in a DataGridView and DataForm.
<telerik:RadEntityFrameworkDataSource Name="ProductsEntityFrameworkDataSource" QueryName="Products">
<telerik:RadEntityFrameworkDataSource.DbContext>
<local:AdventureWorksEntities />
</telerik:RadEntityFrameworkDataSource.DbContext>
</telerik:RadEntityFrameworkDataSource>
How can I save the changes?
Hello,
i got an application where the RadEntityFrameworkDataSource returns no rows.
I have written an Test application, which just handles the issue: the problem remains.
You can download the application at http://w2ww.de/downloads/RadEntityFrameworkDataSource_Test1.zip
You must edit the connection string in the app.config.
I used the .Net Framework in the version 4.5 and Telerik Devcraft for WPF in the version 2015.1.0401.45.
The source:
namespace RadEntityFrameworkDataSource_Test1 {
class Program {
[STAThread]
static void Main(string[] args) {
REFDS_T1Context cntxt = new REFDS_T1Context();
cntxt.Database.CreateIfNotExists();
if (cntxt.Libraries.FirstOrDefault<Library>() == null) {
Library l = new Library("Lib1");
cntxt.Libraries.Add(l);
l = new Library("Lib2");
cntxt.Libraries.Add(l);
cntxt.SaveChanges();
}
var q = (from m in cntxt.Libraries select m).ToList();
Console.WriteLine("---- Output from Linq Queryable");
foreach (Library m in q) {
Console.WriteLine(m.Name);
}
RadEntityFrameworkDataSource refds = new RadEntityFrameworkDataSource();
refds.DbContext = cntxt;
refds.QueryName = "Libraries";
var l2 = refds.DataView;
Console.WriteLine("Output from RadEntityFrameworkDataSource");
var v = l2.TotalItemCount;
Console.WriteLine("TotalItemCount: " + v);
foreach (Library m in l2) { //.ToEnumerable<MediaItem>()
Console.WriteLine(m.Name);
}
Console.WriteLine("---- Ende for Output of: RadEntityFrameworkDataSource");
Console.ReadLine();
}
}
}
----------- The output:
---- Output from Linq Queryable
Lib2
Lib1
Output from RadEntityFrameworkDataSource
TotalItemCount: 0
---- Ende for Output of: RadEntityFrameworkDataSource
---
Best Regards
Winfried Wille