Telerik Forums
UI for WPF Forum
1 answer
690 views
Hello as I can make the RadGridView the Control GridViewSelectColumn cheked dependiento a value that is if the value variable equals or "client" appears appears that the checkbox selected
Stefan
Telerik team
 answered on 26 Aug 2016
3 answers
134 views

Hello Telerik Team,

 

I am facing some issue when trying to load a page with a PDF, just like we find on your updated SDK Samples Browser (PdfViewer -> Change Scale Factor)

basically I just added the required assemblies we see here http://docs.telerik.com/devtools/wpf/controls/radpdfviewer/getting-started , and copied and pasted the code from that sample

The sample runs fine. Even with my PDF on it.

But I am having the error you can see in the attached picture when I place it on my solution.

Is there anything I am missing?

 

Thank you

Jacob
Top achievements
Rank 1
 answered on 26 Aug 2016
3 answers
292 views
I am getting error while supplying aggregate function and then setting itemssource property of chart to datatable...

my code is like below..

   Dim sm As New SeriesMapping
        sm.SeriesDefinition = New LineSeriesDefinition
        sm.ItemMappings.Add(New ItemMapping("VDate"DataPointMember.XCategory))
        sm.ItemMappings.Add(New ItemMapping("Sales"DataPointMember.YValue, ChartAggregateFunction.Sum))
        rd.SeriesMappings.Add(sm)
rd.ItemsSource = DataSetMain.Tables(3)

Error i get...
"No generic method 'Sum' on type 'System.Linq.Enumerable' is compatible with the supplied type arguments and arguments. No type arguments should be provided if the method is non-generic."

Does that mean i cant use datatable which includes aggregate function or...if possible then then how?
Martin Ivanov
Telerik team
 answered on 26 Aug 2016
2 answers
81 views

Hi,

I need to create a set of RadMaskedNumericInput dynamically in code. I have the following (working) code with WPF TextBox

            var textBox = new TextBox
            {
                Height = 23,
                Width = 40,
                Margin = new Thickness(recalculatedPoint.X, recalculatedPoint.Y, 0, 0),
                VerticalAlignment = VerticalAlignment.Top,
                HorizontalAlignment = HorizontalAlignment.Left
            };

            Binding bind = new Binding(bindingExpression)
            {
                Source = this,
                Mode = BindingMode.TwoWay,
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
            };
            textBox.SetBinding(TextBox.TextProperty, bind);

 

When I change the control type from TextBox to RadMaskedNumericInput and binding property from TextBox.TextProperty to RadMaskedNumericInput.ValueProperty control is created but binding does not work.The code is:

            var textBox = new RadMaskedNumericInput
            {
                Height = 23,
                Width = 40,
                Margin = new Thickness(recalculatedPoint.X, recalculatedPoint.Y, 0, 0),
                VerticalAlignment = VerticalAlignment.Top,
                HorizontalAlignment = HorizontalAlignment.Left
            };

            Binding bind = new Binding(bindingExpression)
            {
                Source = this,
                Mode = BindingMode.TwoWay,
                UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged
            };
            textBox.SetBinding(RadMaskedNumericInput.ValueProperty, bind);

 

Has anyone an idea why binding does not work?

Thanks in advance.

Have a nice day

 

Martin Ivanov
Telerik team
 answered on 26 Aug 2016
3 answers
765 views

Is there a way to make the validation error message for input controls in general (WatermarkedTextBox, NumericUpDown, MaskedInputs etc) appear on focus of the field? By default it appears on hovering over the small triangle in the upper-right corner of the control, when it's in the error state. This however is pretty hard for users to figure out and also sometimes to correctly "hit" with the mouse cursor.

Thanks!

Masha
Telerik team
 answered on 26 Aug 2016
1 answer
190 views

I'm trying to get the label to align left, and the text box to align left, in their respective columns. Can't make it happen. Both the label and the textbox seem to move to the same column, and have a mind of their own.

Here's the set-up:

 <Grid ShowGridLines="True" x:Name="DetailsTemplateEdit_Section_Main_Controls" HorizontalAlignment="Stretch" Background="White" MaxWidth="{Binding ActualWidth, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Border}}}">

                        <Grid.RowDefinitions>
                            <RowDefinition Height="auto" />
                            <RowDefinition Height="auto"/>
                            <RowDefinition Height="auto"/>
                        </Grid.RowDefinitions>

                        <Grid.ColumnDefinitions>
                            <ColumnDefinition MinWidth="150" MaxWidth="150"/>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <telerik:DataFormDataField Grid.Row="0" Grid.Column="0" 
                                           Label="{x:Static properties:Resources.Compliance_Label_Name}" 
                                           DataMemberBinding="{Binding Name, Mode=TwoWay}" Template="{DynamicResource CustomDataFormDataFieldControlTemplate}">
                              <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True}" 
                              IsEnabled="{Binding CanBeDeleted}" x:Name="txt_name" HorizontalAlignment="Left"    
                                  Style="{StaticResource WaterMarkTextBox}" THOR:WaterMarkTextHelper.WatermarkText="{x:Static properties:Resources.Compliance_Label_Name}"
                                  MaxLength="50" ToolTip="{x:Static properties:Resources.ComplianceSetup_tooltip_name}" />
                        </telerik:DataFormDataField>

 

So, based on an example I saw the grid should have three columns, and I tried to set the label to be in column 1, and the text box in column 2, and I need both to align to the left within their columns.

Hints ?

Barry
Top achievements
Rank 1
 answered on 25 Aug 2016
11 answers
227 views
hi all, i've a graph editor using other graph component (graph#), now i'm evaluating to replace it with telerik diagram...

the actual component layout the graph with some predefined alghoritm and there's no way to store the changes the user made on the layout. the user can move a node but i cant get the new position when i save the diagram and store the changes...

So the most important requirment is to get and set for each node the location (x,y).

i need to link two nodes with two types of arrow, can telerik set a color for arrow depending on view model?

can i add a context menu to each node?

can i style the node using datatemplate?

add a pic to see the actual

thanks!



John
Top achievements
Rank 1
Iron
 answered on 25 Aug 2016
1 answer
130 views

Hi Everyone,

I have a unique required. I want show error when two rows are same. In attached image table all rows are valid rows except last and first rows. I want show error at first and last row. Can please help me here.

Note: There is no unique Column values.

 Regards,

Rajendar. 

Yoan
Telerik team
 answered on 25 Aug 2016
1 answer
51 views

Hi,

I'm binding a custom ObservableCollection to the AppointmentsSource of radScheduleView. This doesn't specialize ObservableCollection but still implements INotifyPropertyChanged, INotifyCollectionChanged and ICollection.

The fact is : DisplayedElements are not refreshed when I add an element (either with UI or code) and I need to refresh the ScheduleView (for example : changing ViewDefinition) for them to appear. A bigger problem is in inlining editing since CreateInlineAppointment does Remove immediately after CreateNew (because the new element isn't in the displayed element).

Then I wonder what is the "ObservableCollection" expected behaviour for the DisplayedElements to be refreshed ?
Same question may apply to "Appointment" (ours is implementing IAppointment, INotifyPropertyChanged).

Thanks for your help.

Yana
Telerik team
 answered on 25 Aug 2016
2 answers
432 views

I am trying to set the Foreground color of selected RadTreeViewItem but it cannot be set, though, other elements like Background is working.

<UserControl>
<UserControl.Resources>
<DataTemplate x:Key="AdvancedVariableTemplate">
            <RadioButton Checked="itemCont
<ResourceDictionary>
 
<!-- ItemContainerStyleSelector -->
<Style x:Key="AdvancedVariableItemContainerStyle" TargetType="telerik:RadTreeViewItem" BasedOn="{StaticResource RadTreeViewItemStyle}">
        <Setter Property="Background" Value="Red"/>
        <Setter Property="Foreground" Value="Green"/>
</Style>
</ResourceDictionary>
class AdvVariableContainerStyleSelector : StyleSelector
    {
        private Style darkThemeStyle;
        private Style lightThemeStyle;
 
        public override Style SelectStyle(object item, DependencyObject container)
        {
            Configuration config = UserConfigurations.getConfig();
            if (config.AppSettings.Settings["CurrentTheme"] != null)
            {
                switch (config.AppSettings.Settings["CurrentTheme"].Value.ToString().ToUpper())
                {
                    case "LIGHT":
                        return lightThemeStyle;
                    case "STANDARD":
                        return lightThemeStyle;
                    case "DARK":
                        return darkThemeStyle;
                    default:
                        return null;
                }
            }
            else
                return null;
        }
 
        public Style DarkThemeStyle
        {
            get
            {
                return this.darkThemeStyle;
            }
            set
            {
                this.darkThemeStyle = value;
            }
        }
 
        public Style LightThemeStyle
        {
            get
            {
                return this.lightThemeStyle;
            }
            set
            {
                this.lightThemeStyle = value;
            }
        }
    }
ainerRadio_Checked"
Content="{Binding CustomName}" ToolTip="{Binding TooltipString}"/>
        </DataTemplate>
        <HierarchicalDataTemplate x:Key="AdvancedGroupSeriesRadioTemplate" ItemsSource="{Binding LstAppDataSeries}">
            <TextBlock Text="{Binding CustomName}" FontWeight="Bold" />
        </HierarchicalDataTemplate>
        <HierarchicalDataTemplate x:Key="AdvancedGroupSideTemplate" ItemsSource="{Binding  LstAppDataSeriesSides}">
            <TextBlock Text="{Binding CustomName}" FontWeight="Bold"/>
        </HierarchicalDataTemplate>
        <VariablesGroup:VariablesHierarchicalTemplate x:Key="AdvancedVariableItemTemplate"
            VariablesGroupsTemplate="{StaticResource  AdvancedGroupSideTemplate}"
            VariableSideTemplate="{StaticResource AdvancedGroupSeriesRadioTemplate}"
            VariableTemplate="{StaticResource AdvancedVariableTemplate}"/>
        <VariablesGroup:AdvVariableContainerStyleSelector x:Key="AdvancedVariableStyleSelector"
            DarkThemeStyle="{StaticResource AdvancedVariableItemContainerStyle}"
            LightThemeStyle="{StaticResource AdvancedVariableItemContainerStyle}"/>
    </UserControl.Resources>
<Grid>
<telerik:RadTreeView x:Name="lstVariablesAdvanced" SelectedItem="{DynamicResource AdvancedVariableItemContainerStyle}" VerticalAlignment="Stretch" Grid.Row="1" Grid.ColumnSpan="2" BorderThickness="0,0,0,0" ScrollViewer.CanContentScroll="False"
IsEditable="True" SelectionMode="Extended" ItemsSource="{Binding LstAppDataSeriesGrouping}" IsDropPreviewLineEnabled="False" IsDragPreviewEnabled="True"
IsDragTooltipEnabled="False" MouseDown="lstVariablesAdvanced_MouseDown"
IsSingleExpandPath="True" IsExpandOnSingleClickEnabled="False"  IsDragDropEnabled="False"
PreviewKeyDown="lstVariables_PreviewKeyDown" IsLineEnabled="True"
ItemTemplateSelector="{StaticResource AdvancedVariableItemTemplate}"
ItemContainerStyleSelector="{StaticResource AdvancedVariableStyleSelector}"             
Margin="10,0,6,0">
</telerik:RadTreeView>
</Grid>
</UserControl>

Dinko | Tech Support Engineer
Telerik team
 answered on 25 Aug 2016
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
Slider
Expander
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
WebCam
CardView
DataBar
Licensing
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?