Telerik Forums
UI for WPF Forum
13 answers
278 views
Hi,
  I need to do Insertion to RadGridView. when i give my ItemSource Sample objects like Collection of Person with two attributes, it insert.Edit/Delete them fine. but when i give my RadGridView new Object of EDM while Insertion i got Casting error i.e.

Unable to cast object of type 'Agility.Data.ProcurementRequestDetail' to type 'System.Data.Entity.DynamicProxies.ProcurementRequestDe_347B5DFCA18B3270199DC9CEB41ACCC807E270B79F7DB818FE4DD4F835F1D9AF
So do guide me how to Use RadGridView With EDM Entities.

Also this problem is occured when my Object is in Edit mode. but when my Object is new it works fine.
Daniel Mettler
Top achievements
Rank 2
Iron
 answered on 20 Oct 2021
1 answer
190 views

Hi Guys,

We're using a behaviour class that is driven by the DragDropManager, hooking into some of the events, namely GiveFeedback and DragOver.

I'd like to change the cursor to a blocked symbol if the control we're dragging is hovered over another control of the same type.

Within the GiveFeedback event, we're unable to determine what control we're currently hovering over. Instead we tried using the OnDragOver event, where we are able to establish the current position but unable to change the cursor.

Is there any other way to change the cursor without the GiveFeedbackEventArgs?

Thanks

 

 

Martin Ivanov
Telerik team
 answered on 20 Oct 2021
1 answer
390 views

Hello,

I would disable to double-click event to maximize a RadWindow.

I hope you can help to realize that.

 

Many thanks

Stenly
Telerik team
 answered on 19 Oct 2021
2 answers
343 views

After upgrading to 2021.3, I could not change the accent color from Fluent Theme anymore.

I've checked and noticed that the problem is with the MaterialAssist, that is not using the color set in the AccentColor of the FluentPalette.

My code has always been like this:

FluentPalette.Palette.AccentColor = (Color)dicEntry.Value;

And it has always worked (I have an old version with the older components and it still works), but now I don't know what to do to fix it.

Diego Modolo
Top achievements
Rank 1
Iron
Iron
 answered on 18 Oct 2021
0 answers
182 views
I Want to use telerik RadScheduleView control to build Calendar using WPF and MVVM Framework and Storing appointments data (subject, body, Start, End, ...) in Database (SQL Server). The Problem is, i bult AppointmentModel Class that inherits from Appointment Class and used autmapper to map data from DTO object to AppointmentModel but i receive mapping error despite ignoring such properties. Please let me know if this structure is right and if so, what is the problem 
Hussein
Top achievements
Rank 1
 asked on 17 Oct 2021
1 answer
297 views

I want to change DateTime.Now format like MM/dd/yyyy throughout application. so please help me out.

Thanks & Regards

Murugan M

Dilyan Traykov
Telerik team
 answered on 15 Oct 2021
1 answer
229 views

Hi,

I would be happy if you could help me how to download RadBarcodeQR as an image?

Thanks.

Martin Ivanov
Telerik team
 answered on 15 Oct 2021
1 answer
205 views

Hello, I'm using the filtering dropdown window (appearing when clicking the funnel icon) and I want to change the behaviour behind the controls.

For example : I'd like the filter to apply only when clicking the "Filter" button and not directly when checking the checkboxes, the problem is that I have no idea where to change that.

Dinko | Tech Support Engineer
Telerik team
 answered on 14 Oct 2021
1 answer
143 views

The header of the SW is visible but there nothing in the content area, bank white not even the no appointments text.

Attaching sample project and image

App.xaml:

 <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Themes/System.Windows.xaml"/>
                <ResourceDictionary Source="/Themes/Telerik.Windows.Controls.xaml"/>
                <ResourceDictionary Source="/Themes/Telerik.Windows.Controls.Input.xaml"/>
                <ResourceDictionary Source="/Themes/Telerik.Windows.Controls.Navigation.xaml"/>
                <ResourceDictionary Source="/Themes/Telerik.Windows.Controls.ScheduleView.xaml"/>
            </ResourceDictionary.MergedDictionaries>

        </ResourceDictionary>

 

UC:

        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" >
    <Grid>

        <telerik:RadScheduleView  >
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition DayStartTime="8:00" />
                <telerik:WeekViewDefinition DayStartTime="8:00" />
                <telerik:MonthViewDefinition />
                <telerik:TimelineViewDefinition />
                <telerik:AgendaViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
    </Grid>


Is there anything I am doing wrong?

Thank you.

Esh
Top achievements
Rank 1
Iron
 answered on 14 Oct 2021
1 answer
3.6K+ views

Hi, I'm trying to set focus on a textbox in a grid with a 'New' button click.  the button has style setter to enable the text box on click, but i cannot get the textbox to get focus.  best i can get is the cursor frozen in the textbox, requiring user to hit tab or enter.  All my searching is saying there's a bug that will be fixed - years ago.  I'm running the current version 2021.R3

trying the focusmanager does nothing.  Here is the code:

<UserControl x:Class="Arc2.App.Views.JobNoteVw"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Arc2.App.Views"
xmlns:Utils="clr-namespace:Arc2.App.Controls"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
mc:Ignorable="d" 
d:DesignHeight="500" d:DesignWidth="560">
    <Grid>
        <Grid.Style>
            <Style>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsNew}" Value="True">
                        <Setter Property="FocusManager.FocusedElement" Value="{Binding ElementName=txNote}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

        </Grid.Style>
        <Grid.Background>
            <LinearGradientBrush StartPoint="0,1" EndPoint="0,0">
                <GradientStop Offset="0" Color="White"/>
                <GradientStop Offset="1" Color="CadetBlue"/>
            </LinearGradientBrush>
        </Grid.Background>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="120"/>
            <ColumnDefinition Width="155"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="155"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="32"/>
            <RowDefinition Height="32"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="4"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="3*"/>
        </Grid.RowDefinitions>
        <!--Row 0-->
        <TextBlock Text="WO Number:" Margin="10,0,10,5" VerticalAlignment="Bottom"  TextAlignment="Right" Height="16" />
        <TextBlock Text="Job Number:" Margin="10,0,10,5" Grid.Row="1" VerticalAlignment="Bottom"  TextAlignment="Right" Height="16" />
        <TextBlock x:Name="txtWo" Text="{Binding SelJob.TrackingNumber, Mode=OneWay}" Grid.Column="1" IsEnabled="False"
HorizontalAlignment="Stretch" Margin="5,0,5,5" VerticalAlignment="Bottom" Foreground="DarkGreen" Height="16" />
        <TextBlock x:Name="txtJob" Text="{Binding SelJob.JobNumber, Mode=OneWay}" Grid.Row="1" Grid.Column="1" IsEnabled="False" 
HorizontalAlignment="Stretch" Margin="5,0,5,5" VerticalAlignment="Bottom" Foreground="DarkGreen" Height="16" />
        <!-- Row 2-->
        <TextBlock Text="Job Description:" Grid.Row="2" Margin="10,5,10,0" TextAlignment="Right"/>
        <TextBox x:Name="txtJobDesc" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3"
                 Text="{Binding SelJob.JobDescription, Mode=OneWay}" IsEnabled="False"
                 Margin="5" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" TabIndex="1" IsTabStop="True"/>

        <!--Row 3-->
        <TextBlock Text="Note:" Grid.Row="3" Margin="10,5,10,0" TextAlignment="Right"/>

        <Grid x:Name="d1" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3"
VerticalAlignment="Stretch"
                    FocusManager.FocusedElement="{Binding ElementName=TxNote}">
            <Grid.Style>
                <Style>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding HasRows}" Value="False">
                            <Setter Property="Grid.IsEnabled" Value="False"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding HasRows}" Value="True">
                            <Setter Property="Grid.IsEnabled" Value="True"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Grid.Style>
            <TextBox x:Name="TxNote" Text="{Binding TmpJobNote.Note}" VerticalAlignment="Stretch"
Margin="5,3" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap"
                     IsTabStop="False" KeyboardNavigation.IsTabStop="False">
                <TextBox.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsEdit}" Value="True">
                                <Setter Property="TextBox.IsEnabled"  Value="True"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEdit}" Value="False">
                                <Setter Property="TextBox.IsEnabled"  Value="False"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </TextBox.Style>
            </TextBox>
        </Grid>
        <!-- Row 4 -->
        <TextBlock Text="Effective Date:"
   Grid.Row="4" VerticalAlignment="Center"
   Margin="10,9,10,10" TextAlignment="Right" Height="16" />
        <telerik:RadDatePicker x:Name="d3"
   Grid.Row="4" Grid.Column="1" VerticalAlignment="Center"
   SelectedValue="{Binding TmpJobNote.TimeStamp}"
                                   DateTimeWatermarkContent="Select Date..."
                                   TodayButtonVisibility="Visible"
   Margin="5,1" HorizontalAlignment="Stretch" Height="22">
            <telerik:RadDatePicker.Style>
                <Style>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding HasRows}" Value="False">
                            <Setter Property="telerik:RadDatePicker.IsEnabled" Value="False"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding HasRows}" Value="True">
                            <Setter Property="telerik:RadDatePicker.IsEnabled" Value="True"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsEdit}" Value="True">
                            <Setter Property="telerik:RadDatePicker.IsEnabled"  Value="True"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsEdit}" Value="False">
                            <Setter Property="telerik:RadDatePicker.IsEnabled"  Value="False"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </telerik:RadDatePicker.Style>
        </telerik:RadDatePicker>
        <TextBlock Text="Author:" Margin="10,7" Grid.Row="4" Grid.Column="2" VerticalAlignment="Center" TextAlignment="Right" Height="16" />
        <!--<telerik:RadDatePicker x:Name="dtTimeStamp" Width="150" Margin="0,2" HorizontalAlignment="Left" />-->
        <TextBox x:Name="txtAuthor" Text="{Binding AuthorNm}" Grid.Row="4" Grid.Column="3"
Margin="5" HorizontalAlignment="Stretch" IsReadOnly="True">
            <TextBox.Style>
                <Style>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsEdit}" Value="True">
                            <Setter Property="TextBox.IsEnabled"  Value="True"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding IsEdit}" Value="False">
                            <Setter Property="TextBox.IsEnabled"  Value="False"/>
                        </DataTrigger>

                    </Style.Triggers>
                </Style>
            </TextBox.Style>
        </TextBox>

        <!--Row 5-->
        <TextBlock Text="Date Added:" Grid.Row="5" Margin="0,9,10,10" HorizontalAlignment="Right" VerticalAlignment="Center" Height="16" Width="66" />
        <TextBox x:Name="txtDtAdd" Text="{Binding TmpJobNote.DateAdded}"
Grid.Column="1" Grid.Row="5" Margin="5,5" IsReadOnly="True" IsTabStop="False" />
        <TextBlock Text="Date Updated:" Margin="5,9,5,10"
   Grid.Row="5" Grid.Column="2" VerticalAlignment="Center" TextAlignment="Right" Height="16" />
        <TextBox x:Name="txtDtUpdate" Text="{Binding TmpJobNote.DateUpdated}"
Grid.Row="5" Grid.Column="3"
Margin="5,5" IsReadOnly="True" IsTabStop="False" />
        <!--Row 7-->
        <StackPanel Orientation="Horizontal" Grid.Row="7" Grid.ColumnSpan="4" HorizontalAlignment="Center" Margin="8,0" Width="544">
            <Button Content="New" Margin="15,2" Width="70" FontWeight="Bold"
Command="{Binding NewCommand}">
                <Button.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsNew}" Value="True">
                                <Setter Property="Button.IsEnabled"  Value="False"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsNew}" Value="False">
                                <Setter Property="Button.IsEnabled"  Value="True"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEdit}" Value="True">
                                <Setter Property="Button.IsEnabled"  Value="False"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEdit}" Value="False">
                                <Setter Property="Button.IsEnabled"  Value="True"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>
            <Button Content="Save" Margin="15,2" Width="70" FontWeight="Bold"
Command="{Binding SaveCommand}">
                <Button.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsEdit}" Value="True">
                                <Setter Property="Button.IsEnabled"  Value="True" />
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEdit}" Value="False">
                                <Setter Property="Button.IsEnabled"  Value="False" />
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>
            <Button Content="Edit" Margin="15,2" Width="70" FontWeight="Bold"
Command="{Binding EditCommand}">
                <Button.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsEdit}" Value="True">
                                <Setter Property="Button.IsEnabled"  Value="False"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEdit}" Value="False">
                                <Setter Property="Button.IsEnabled"  Value="True"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding HasRows}" Value="False">
                                <Setter Property="Button.IsEnabled" Value="False"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding HasRows}" Value="True">
                                <Setter Property="Button.IsEnabled" Value="True"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>
            <Button Content="Cancel" Margin="15,2" Width="70" FontWeight="Bold"
Command="{Binding CancelCommand}">
                <Button.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsEdit}" Value="True">
                                <Setter Property="Button.Visibility"  Value="Visible"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsEdit}" Value="False">
                                <Setter Property="Button.Visibility"  Value="Collapsed"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>
            <Button Content="Delete" Margin="65,2,10,2" Width="70" FontWeight="Bold"
Command="{Binding DeleteCommand}">
                <Button.Style>
                    <Style>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsNew}" Value="True">
                                <Setter Property="Button.IsEnabled"  Value="False"/>
                            </DataTrigger>
                            <DataTrigger Binding="{Binding IsNew}" Value="False">
                                <Setter Property="Button.IsEnabled"  Value="True"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>
            </Button>
        </StackPanel>

        <!--Row 5-->
        <telerik:RadGridView HorizontalAlignment="Stretch"
x:Name="gvJobNote"
Margin="5,5,5,0"
Grid.Row="8"
Grid.ColumnSpan="4"
VerticalAlignment="Top"
EnableLostFocusSelectedState="False"
RowIndicatorVisibility="Collapsed"
AutoGenerateColumns="False"
AlternationCount="2"
IsReadOnly="True"
ItemsSource="{Binding JobNoteList}"
SelectedItem="{Binding SelJobNote}"
AlternateRowBackground="#FFB4D2D3">
            <i:Interaction.Behaviors>
                <Utils:GridViewScrollIntoView/>
            </i:Interaction.Behaviors>
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Eff Dt" DataMemberBinding="{Binding TimeStamp}" DataFormatString="{} {0:MM/dd/yyyy}" HeaderTextAlignment="Center" Width="85" TextAlignment="Center" />
                <telerik:GridViewDataColumn Header="Note" DataMemberBinding="{Binding Note}" TextAlignment="Left" Width="*" HeaderTextAlignment="Center"  />
                <telerik:GridViewDataColumn Header="Author" DataMemberBinding="{Binding Author}" HeaderTextAlignment="Center" Width="90" />
                <telerik:GridViewDataColumn Header="Added" DataMemberBinding="{Binding DateAdded}" HeaderTextAlignment="Center" Width="140" TextAlignment="Right" />
                <telerik:GridViewDataColumn Header="Updated" DataMemberBinding="{Binding DateUpdated}" Width="140" HeaderTextAlignment="Center" />
            </telerik:RadGridView.Columns>

        </telerik:RadGridView>

    </Grid>
</UserControl>
Stenly
Telerik team
 answered on 13 Oct 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?