Telerik Forums
UI for WPF Forum
6 answers
140 views
When OnEditEnded is fired the e.OldValue and e.NewValue don't seem to have the correct value. They both always have the old value. I need to be able to see if the value has changed to update the a dirty data flag in my application. Is there any way to do this? Thanks
Ivan Ivanov
Telerik team
 answered on 05 Feb 2015
2 answers
399 views
Hello,

The RadSlider is charming when sliding over a decimal range.

Now how about sliding over a date/time/period. I.e. Maximum=max-date, Minimum=min-date, TickFrequency=1day, and so on?

Is there something like that?

Cheers,
Z
Pat
Top achievements
Rank 1
 answered on 04 Feb 2015
1 answer
300 views
Hi,

I have a toolbox with custom shapes. I have a grid with snapping to grid enabled.
Once shapes are on the grid, they snap fine when I drag them.
But they don't snap the first time, when I drag shapes from the toolbox.

I would like to achieve this. Is there some setting I'm missing? Or would I have to implement a custom Snapping Service maybe?

Thanks for any input.
Zarko
Telerik team
 answered on 04 Feb 2015
6 answers
328 views
Hi There 

I have been loading shapefiles which are copied into the project whose Build Action is set to Resource.

Now I have a situation where we are creating shapefiles at runtime and are saved to different location i.e c:\\Shapefile\\

1. How can I load shapefile created at runtime using UI Virtualization asyn reader.

2. It is good practice to create virtualization layer for each shapefiles or load all shapefiles in one virtualization layer. Each shapefiles have different properties i.e. zoom level, fill etc, so i assume I should create virtualization layer for each shapefiles.

3. The property of shapefiles are saved in .dbf file.Can we read .dbf files to create a property window to get/set shapefile properties.Do you have any similar project on GitHub.

Thanks in Anticipation.
Pavel R. Pavlov
Telerik team
 answered on 04 Feb 2015
1 answer
147 views
Hello Group, I have see various topics on the Isdropdown but none of them seem to have the solution to this specific problem: I am trying to control the opening and closing behaviour of the behaviour by setting the Isropdown property but is does not seem to work.
Is there a solution for this one?

Thanks,

    Richard
Nasko
Telerik team
 answered on 04 Feb 2015
1 answer
210 views
Hello /< /> how to set direction right to left worksheet or workbook when export radgrid data to excel?
i use :
using Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml.Xlsx;
using Telerik.Windows.Documents.Spreadsheet.Model;
            var workbook = new Workbook();
            var worksheet = workbook.Worksheets.Add();
thanks
Anna
Telerik team
 answered on 04 Feb 2015
8 answers
383 views
I am trying to use a custom type in my filter where I want to show all distinct versions of my type in the list, and this works! 


But when I select a value and try to filter on that value I get an error

var filter = new FilterDescriptor(dataMember, FilterOperator.IsEqualTo, checkBoxCustomFilterType.Text);

filter has the value "{PTestType IsEqualTo ks k}" where "ks k" is one of my distint values but its like the PTestType is not converted using the typeconverter? Because then this is thrown 

An exception of type 'System.ArgumentException' occurred in mscorlib.dll but was not handled in user code

Additional information: The value "(PTestType IsEqualTo ks k)" is not of type "Telerik.Windows.Data.IFilterDescriptor" and cannot be used in this generic collection.



Custom type Class

namespace Systematic.KVK.InseminationPlan.UIL.Details.Windows.TestBucket.DOM
{
    [TypeConverter(typeof(TestTypeConverter))]
    public class PTestType : IEquatable<PTestType>
    {
        public long Id { get; set; }
        public string ShortTestName { get; set; }
        public string TestName { get; set; }
 
        public bool Equals(PTestType other)
        {
            return Id == other.Id;
        }
 
        public override string ToString()
        {
            return ShortTestName;
        }
 
        public override int GetHashCode()
        {
            return (int)Id;
        }
 
        public override bool Equals(object obj)
        {
            var type = obj as PTestType;
            if (type != null)
            {
                return Id == type.Id;
            }
 
            return false;
        }
 
        bool IEquatable<PTestType>.Equals(PTestType other)
        {
            if (other == null)
            {
                return false;
            }
 
            return StringComparer.Ordinal.Equals(Id, other.Id);
        }
    }
}


Type converter and valueconverter

namespace Systematic.KVK.InseminationPlan.UIL.Details.Windows.TestBucket.Tabs.TestBucketTab
{
    public class PTestTypeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var TestType = (PTestType)value;
 
            return TestType.ShortTestName;
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
 
    public class TestTypeConverter : TypeConverter
    {
        public TestTypeConverter()
        {
             
        }
 
        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            return sourceType == typeof(string);
        }
 
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            var stringValue = value as string;
            if (stringValue != null)
            {
                return new PTestType {Id = 1, TestName = "sdfsdf",ShortTestName = "shortsd"};
            }
 
            return base.ConvertFrom(context, culture, value);
        }
 
        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                return true;
            }
 
            return base.CanConvertTo(context, destinationType);
        }
 
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                return ((PTestType)value).ShortTestName;
            }
 
            return base.ConvertTo(context, culture, value, destinationType);
        }
    }
}


My Custom filter codebehind

namespace Systematic.KVK.InseminationPlan.UIL.Details.Windows.TestBucket.CustomFilters
{
    public partial class TestTypeCheckBoxFilterControl : IFilteringControl
    {
        public ObservableCollection<CheckBoxCustomFilterType> CustomItems { get; set; }
        private GridViewBoundColumnBase column;
        private CompositeFilterDescriptor compositeFilter;
 
        public TestTypeCheckBoxFilterControl()
        {
            InitializeComponent();
            CustomItems = new ObservableCollection<CheckBoxCustomFilterType>();
             
            DataContext = this;
        }
 
        private void OnFilter(object sender, RoutedEventArgs e)
        {
            column.DataControl.FilterDescriptors.Clear();
            compositeFilter = new CompositeFilterDescriptor {LogicalOperator = FilterCompositionLogicalOperator.Or};
            var dataMember = column.DataMemberBinding.Path.Path;
            foreach (var checkBoxCustomFilterType in CustomItems)
            {
                if (checkBoxCustomFilterType.Checked)
                {
                    var filter = new FilterDescriptor(dataMember, FilterOperator.IsEqualTo, checkBoxCustomFilterType.Text);
                    compositeFilter.FilterDescriptors.Add(filter);
                }
            }
 
            if (!column.DataControl.FilterDescriptors.Contains(compositeFilter))
            {
                column.DataControl.FilterDescriptors.Add(compositeFilter);
            }
 
            IsActive = true;
        }
 
        private void OnClear(object sender, RoutedEventArgs e)
        {
            column.DataControl.FilterDescriptors.Clear();
            compositeFilter.FilterDescriptors.Clear();
            CustomItems.ForEach(x => x.Checked = false);
        }
 
        public void Prepare(Telerik.Windows.Controls.GridViewColumn column)
        {
            CustomItems.Clear();
 
            this.column = column as GridViewBoundColumnBase;
 
 
 
            var distinctValues = ((RadGridView)column.Parent).GetDistinctValues(column, false);
 
            foreach (PTestType distinctValue in distinctValues)
            {
                CustomItems.Add(new CheckBoxCustomFilterType {Checked = false, Text = distinctValue.ToString()});
            }
        }
 
        public bool IsActive { get; set; }
 
        private void SelectAll(object sender, RoutedEventArgs e)
        {
            var checkbox = (sender as CheckBox);
            if (checkbox == null || checkbox.IsChecked == null)
            {
                return;
            }
 
            foreach (var checkBoxCustomFilterType in CustomItems)
            {
                checkBoxCustomFilterType.Checked = checkbox.IsChecked.Value;
            }
        }
    }
}


My usages of my custom filter

<telerik:GridViewDataColumn
    DataMemberBinding="{Binding Path=PTestType}"
    IsReadOnly="True"
    IsFilterable="True"
    Header="{x:Static localization:TestBucketTexts.TestType}">
    <telerik:GridViewDataColumn.FilteringControl>
        <customFilters:TestTypeCheckBoxFilterControl />
    </telerik:GridViewDataColumn.FilteringControl>
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate DataType="dom:PBucketModel">
            <TextBlock
                Text="{Binding Path=PTestType}" />
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
Boris
Telerik team
 answered on 04 Feb 2015
4 answers
285 views
Hello gurus! :-)

I am working on a project where one specific menu needs to have its sub menus open on the left rather than the right. I have tried the Placement property on the popups in the styles, but they don't seem to have any effect. Can you please help me?
Eric Moreau
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 04 Feb 2015
3 answers
204 views
Hi,

I've searched the forums as well as the documentation but I couldn't get what I wanted. What I'm after is having something similar to this http://www.telerik.com/help/wpf/radcombobox-grid-like-dropdown.html but using the Telerik Gridview control instead. I could get things going a bit as shown in the attachment. However, I did it by binding the gridview to the data because when I try to also bind the data to the combobox I get an error at runtime telling me "{"Items collection must be empty before using ItemsSource."}".

Is what I'm trying to achieve even possible currently? If so how?

TIA

David
Kalin
Telerik team
 answered on 04 Feb 2015
4 answers
193 views
How do I add a ContextMenu for the PDFViewer?

I've tried this;
<telerik:RadContextMenu.ContextMenu>
                    <telerik:RadContextMenu DataContext="{Binding ElementName=pdfViewer, Path=Commands}">
                        <telerik:RadMenuItem Header="Copy" Command="{Binding CopyCommand}"/>
                        <telerik:RadMenuItem Header="Select All" Command="{Binding SelectAllCommand}"/>
                        <telerik:RadMenuItem Header="Print..." Command="{Binding PrintPdfDocumentCommand}"/>
                    </telerik:RadContextMenu>

But the menu items don't do anything.

Thanks.
Kammen
Telerik team
 answered on 04 Feb 2015
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
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?