Hi,
I am getting this exception and need help badly.
Scenario:
I have a table Users. Binded this entity to GridView.
I have one more table Roles. Id of Roles is foreignKey RoleID in Users.
Binded this as a combo-box column in GridView
this.radGridView.Columns.Add(new GridViewComboBoxColumn()
{
ItemsSourceBinding = new System.Windows.Data.Binding("Roles") { Source = this.DataContext },
DataMemberBinding = new System.Windows.Data.Binding("Role") ,
DisplayMemberPath = "Role",
SelectedValueMemberPath = "RoleID",
Header = "User-Role",
FilterMemberPath="RoleReconUserRoles.Role",
IsReadOnly=false,
Name = "gridView"
});
It works fine. But, when I change the item in the combo-box, and try to commit, it changes back to the original value because I get this ForeignKeyReferenceAlreadyHasValueException exception in the entity.
/// <summary>
/// Gets or sets the Role column value.
/// </summary>
[System.Data.Linq.Mapping.Column(Name = "Role", Storage = "_role", DbType = "int NOT NULL", IsPrimaryKey = true, CanBeNull = false, UpdateCheck = System.Data.Linq.Mapping.UpdateCheck.Never)]
[System.Runtime.Serialization.DataMember(Order = 3)]
[System.CodeDom.Compiler.GeneratedCode("CodeSmith", "6.0.0.0")]
public int Role
{
get { return _role; }
set
{
if (_role != value)
{
if (_roleReconUserRoles.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
OnRoleChanging(value);
SendPropertyChanging("Role");
_role = value;
SendPropertyChanged("Role");
OnRoleChanged();
}
}
}
Any help is appreciated!
Thanks in advance,
Sindhu
I'm trying to load xlsx document about 15MB size - spreadsheet is hung. All documents larger than 1 MB is very slow loaded.
Please tell me how to speed up downloading large documents (more that 1MB)?
Thanks.

Hi,
We are currently using Telerik () RadGridview for our WPF client application. The data is displayed in ScheduleView format for users as Weeks/Days where user can create a block (Tile) on a specific day and time. Once the block is created on the grid user can select the block and edit the contents. The data that is binded to the grid is coming from SQL Server database which is common to all the users who are using this client application and Schedule Grid.
Our business requirement is, when a particular user has open this schedule grid on his screen, he see all the blocks created by different users including his own blocks. User should be able to edit his block and at the same time all other blocks on the screen inside the grid should be auto refreshed (may be after 1 min) to reflect the changes saved in DB by other users that too without restricting the user to edit his own block and without locking the UI. User should be still allowed to continue his edit operation when auto refresh is happening for other changed blocks...
Is it possible in Telerik Radgrid (any version) to auto refresh (every after 1 min) entire contents except the the one user is editing without locking the UI?
Any help is appreciated...
Hello,
In a project I use RadDateTimePicker (InputMode="DatePicker", DateTimeWatermarkContent="Custom watermark") as a separate control and as a part of DataTemplate for items in ListBox (ItemsControl). Initially I used version 2013.3, then I tried to use version 2015.2. Separate controls work fine. But RadDateTimePicker in DataTemplate began to display "EnterDate" for watermark content. The only thing I changed was Telerik dlls of another version.
<Window x:Class="RadDateTimePickerDemo.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:local="clr-namespace:RadDateTimePickerDemo" mc:Ignorable="d" Title="MainWindow" Height="350" Width="500"> <Grid Margin="10"> <Grid.ColumnDefinitions> <ColumnDefinition Width="150"/> <ColumnDefinition Width="20"/> <ColumnDefinition Width="160"/> </Grid.ColumnDefinitions> <telerik:RadDateTimePicker VerticalAlignment="Top" Margin="0,2,0,0" InputMode="DatePicker" DateTimeWatermarkContent="Custom watermark"/> <ListBox x:Name="listBox" Grid.Column="2" HorizontalContentAlignment="Stretch" BorderThickness="0" Padding="0"> <ListBox.ItemTemplate> <DataTemplate> <telerik:RadDateTimePicker InputMode="DatePicker" DateTimeWatermarkContent="Custom watermark"/> </DataTemplate> </ListBox.ItemTemplate> </ListBox> </Grid></Window>I attached screenshots for different versions. Project's .net version - 4.6, Windows 10, 64bit.
Regards,
Andrey
Hey,
I have a button that changes my appointment start and end times between UTC and Local to a slected Timezone. The button updates the appointments correctly but I cannot get the UI to update accordingly. I have noticed that a forum post from two years ago address' this problem but it did not look like a solution was found as I too am using MVVM.
Any suggestions?
Thanks,
Cameron
Hello
is it possible to display and edit numbers using a scientific notation in NumericUpDown? how can i do that?
I created a some function inherited from the FunctionBase:
public class MyFunc : FunctionBase
And i want to return result into two cells:
return new ArrayExpression(new RadExpression[,] { { new StringExpression("123"), new StringExpression("321") } });
But when i use my function in spreadsheet, only one cell correctly filled. I expect that will be filled with a range of two cells "123" and "321".
How to correctly fill range of cells from MyFunc?
Thank you.
