Telerik Forums
UI for WPF Forum
4 answers
167 views
Hi,

Power Builder 12.0.NET will using Visual Studio Isolated Shell (now, still in beta version).Did Telerik  WPF Control fully support Power Builder 12.0.NET?Especially in Datawindow feature.If is support it, my company have a plan to use Telerik WPF Control.
Thanks.

Best Regard
Deny FS.
Martin Ivanov
Telerik team
 answered on 13 Nov 2015
4 answers
91 views

I have noticed that when using Intersection PropertySetMode that property change notifications from Objects in the List of items are not used by the property grid. Is this a known limitation or a bug?

 

I am using version 2015.2.728.

 

PropertyGrid.PropertySetMode = PropertySetOperation.Intersection;
PropertyGrid.Item = new List<Object> { myObject1, myObject2 };

 

// Property change notifications from myObject1 and myObject2 do cause the property grid values to update.

Stefan Nenchev
Telerik team
 answered on 13 Nov 2015
1 answer
279 views

Hi

i am wpf programmer and use telerik grid view for showing database table.

i have a GridViewComboBoxColumn in my grid and the combobox items for each row is different.

how can i bind data for each row combo in run time?

Dilyan Traykov
Telerik team
 answered on 13 Nov 2015
1 answer
260 views

I want to get row value after i click a cell. I try using SelectionChanged and follow so many Q&A in many forum and still can't do this. maybe if you guys can give me an example for this, maybe after click a cell it will give message about every value in that row?

here is my whole code, i hope telerik team can help me.

XAML

<Grid>
        <StackPanel x:Name="xPanel">
            <telerik:RadGridView x:Name="dataGrid"
                                 AutoGenerateColumns="False"
                                 ColumnWidth="*"
                                 ShowGroupPanel ="False"
                                 CanUserReorderColumns ="False"
                                 ItemsSource="{Binding}"
                                 SelectionChanged="dataGrid_SelectionChanged">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn Header="idx"
                                                DataMemberBinding="{Binding idx}" />
                    <telerik:GridViewDataColumn Header="tag"
                                                DataMemberBinding="{Binding tag}" />
                    <telerik:GridViewDataColumn Header="value"
                                                DataMemberBinding="{Binding value}" />
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>
            <telerik:RadButton Content="Update" Height="30" Click="RadButton_Click" />
        </StackPanel>
    </Grid>

CS

namespace Setting
{
    public partial class MainWindow : Window
    {
        ScimoreDataAdapter dataAdp;
        DataSet ds;
 
        public MainWindow()
        {
            InitializeComponent();
 
            string dbInstanceName = "C:\\Users\\Abc\\Documents\\Visual Studio 2010\\Projects\\Setting\\Setting\\configdb";
            ScimoreEmbedded em = new ScimoreEmbedded();
            em.Open(dbInstanceName);
 
            try
            {
                using (ScimoreConnection cn = em.CreateConnection())
                {
                    cn.Open();
                    string query = "select idx,tag,value from config.info";
                    dataAdp = new ScimoreDataAdapter(query, cn);
                    DataTable dataTable = new DataTable("info");
                    ds = new System.Data.DataSet();
                    dataAdp.Fill(ds, "info");
                    dataGrid.ItemsSource = ds.Tables[0];
                    dataAdp.Update(ds, "info");
                }
            }
            catch (Exception)
            {
            }
        }
 
        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
             
        }
 
        private void dataGrid_SelectionChanged(object sender, SelectionChangeEventArgs e)
        {
            //System.Data.DataRowView CurrentSelected = ((System.Data.DataRowView)dataGrid.SelectedItem);
            //MessageBox.Show(Convert.ToString(CurrentSelected.Row.ItemArray[1]));
        }
    }
}

Dilyan Traykov
Telerik team
 answered on 13 Nov 2015
9 answers
192 views
I am loading a scanned PDF in the PDFViewer and if I navigate away from the page that is loading the pdf before the image of the pdf is finished rendering it causes the following exception: "The given key was not present in the dictionary"

I believe the exception comes from ImageLoader_WorkCompleted method from the Telerik.Windows.Documents.Fixed dll.
Tanya
Telerik team
 answered on 13 Nov 2015
0 answers
105 views
Hello,

I have downloaded and install a very beautiful Telerik winform application. I found a very nice tab control (We say probably radpageview to it in winforms) with a little close image aligned at right side. I am really impressed and want to create it in wpf. Telerik TabControl doesnot fullfill this behavior by default. I actually need to implement it dynamically when a user click on button. For example when a user click on button a tab control should be created dynamically as you can see in attached image.

I want to achieve this by using mvvm/xaml pattern using as much as simple example code. If you please send a sample project with complete code implementation i will be really glad and thankful.

 
Rauf
Top achievements
Rank 1
 asked on 12 Nov 2015
0 answers
121 views

Hello,

I have downloaded and install a very beautiful telerik winform application. I found a very nice tab control (We say probably radpageview to it in winforms) with a little close image aligned at right side. I am really impressed and want to create it in wpf. Telerik TabControl doesnot fullfill this behavior by default. I actually need to implement it dynamically when a user click on button. For example when a user click on button a tab control should be created dynamically as you can see in attached image.

I want to achieve this by using mvvm/xaml pattern using as much as simple example code. If you please send a sample project with complete code implementation i will be really glad and thankful.

 

Rauf
Top achievements
Rank 1
 asked on 12 Nov 2015
1 answer
111 views

Hi,

I'm seeing this "you are using unsupported command line flag --disable web security" error message in Chrome (Version 46.0.2490.86 m)​, which appears to be coming from Telerick's Test Studio plugins, as I don't see them when those are disabled.

Is there a way to get rid of that error message?

Thanks,

Arcady

Julia
Top achievements
Rank 1
 answered on 12 Nov 2015
3 answers
389 views
I've been playing with your Barcode Reader and assume I am doing something wrong or missing something. 

First, is there a way to "push the Open button" from the library?  When I produce a barcode image, I'd like to just have it read that when I ask in code... not from the button.

Secondly and more important, I can't get a good read.  I have created a demo app that I'd be happy to share.  I print a 128 barcode to PNG file.  Then, I attempt to read the value back using the reader and it never returns the value I entered into the barcode.

Output Barcode to PNG File:
SaveFileDialog dialog = new SaveFileDialog()
{
    DefaultExt = "png",
    Filter = "png (*.png)|*.png"
};
 
if (dialog.ShowDialog() == true)
{
    using (Stream stream = dialog.OpenFile())
    {
        Telerik.Windows.Media.Imaging.ExportExtensions.ExportToImage(
            barCode,
            stream,
            new PngBitmapEncoder());
    }
}

Let me know if you want me to upload my demo app.
Joel
Joel Palmer
Top achievements
Rank 2
 answered on 12 Nov 2015
2 answers
158 views

I'm experiencing some odd behavior when changing the PropertySetMode at runtime. 

 

I have two object types: MyTestClass1 and MyTestClass2. MyTestClass1 has a writeable property IntProp and MyTestClass2 has a readonly property IntProp. If I start in Intersection mode with Item = List<Object> { myTestClass1Obj1, myTestClass1Obj2 } everything works properly. If I then change to PropertySetMode None with Item = myTestClass2Obj, the editor for IntProp will be writeable even though IntProp on myTestClass2Obj has no public setter.

 

See runnable test case below. I am running 2015.2.728

<Window x:Class="WpfApplication1.MainWindow"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"       
        Title="MainWindow" Height="350" Width="525">
    <Grid>
    <StackPanel Orientation="Vertical">
      <Button Click="ButtonBase_OnClick">Change to mode none</Button>
      <telerik:RadPropertyGrid x:Name="rpg"/>
    </StackPanel>
  </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using System.ComponentModel.DataAnnotations;
using Telerik.Windows.Controls.Data.PropertyGrid;
 
namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
      private readonly MyTestClass test;
    private readonly MyTestClass test2;
    private readonly MyTestClass2 test3;
 
    public MainWindow()
        {
            InitializeComponent();
            rpg.AutoGeneratingPropertyDefinition += new EventHandler<Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs>(rpg_AutoGeneratingPropertyDefinition);
 
      // test data. IntProp is has a public setter
      test = new MyTestClass() { StringProp = "91das", RequiredField = "abc", IntProp = 10, DateTimeProp = new DateTime(1920, 2, 21) };
      test2 = new MyTestClass() { StringProp = "91das", RequiredField = "abc", IntProp = 10, DateTimeProp = new DateTime(1920, 2, 21) };
 
      // test data. IntProp is read only (no public setter)
      test3 = new MyTestClass2() { StringProp = "91das", RequiredField = "abc", DateTimeProp = new DateTime(1920, 2, 21) };
 
      rpg.Item = new List<Object> {test, test2};
      rpg.PropertySetMode = PropertySetOperation.Intersection;
        }
 
        void rpg_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e)
        {
            (e.PropertyDefinition.Binding as Binding).ValidatesOnDataErrors = true;
            (e.PropertyDefinition.Binding as Binding).NotifyOnValidationError = true;
            (e.PropertyDefinition.Binding as Binding).ValidatesOnExceptions = true;
        }
 
        private ObservableCollection<ValidationError> results;
 
        public ObservableCollection<ValidationError> Results
        {
            get
            {
                if (this.results == null)
                {
                    this.results = new ObservableCollection<ValidationError>();
                }
                return results;
            }
        }
     
    private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
    {
      rpg.PropertySetMode = PropertySetOperation.None;
      rpg.Item = test3;
      // the property grid will now allow setting of test3.IntProp even though there is
      // no public setter
    }
  }
 
 
    public class MyTestClass : IDataErrorInfo, INotifyPropertyChanged
    {
         
        private int intVar;
        private string requiredField;
 
        public int IntProp
        {
            get { return intVar; }
            set
            {
                intVar = value;
                this.OnPropertyChanged("IntProp");
            }
        }
 
        [Required(ErrorMessage = "This field is Required.")]
        public string RequiredField
        {
            get { return requiredField; }
            set
            {
                requiredField = value;
                ValidateProperty("RequiredField", value);
                this.OnPropertyChanged("RequiredField");
            }
        }
 
        private string stringVar;
 
        public string StringProp
        {
            get { return stringVar; }
            set
            {
                stringVar = value;
                this.OnPropertyChanged("StringProp");
            }
        }
 
        private DateTime dateTimeVar;
 
        public DateTime DateTimeProp
        {
            get { return dateTimeVar; }
            set
            {
                dateTimeVar = value;
                this.OnPropertyChanged("DateTimeProp");
            }
        }
 
        [Browsable(false)]
        public string Error
        {
            get { return string.Empty; }
        }
 
        public string this[string columnName]
        {
            get
            {
                if (columnName == "IntProp")
                {
                    return this.IntProp < 100 && this.IntProp > 0 ? string.Empty : "Value should be in the range of (0, 100)";
                }
                if (columnName == "StringProp")
                {
                    return this.StringProp != null && Regex.IsMatch(this.StringProp, @"^[0-9]+[\p{L}]*") ? string.Empty : @"Value should math the regex: ^[0-9]+[\p{L}]*";
                }
                if (columnName == "DateTimeProp")
                {
                    return this.DateTimeProp.Year > 1900 ? string.Empty : "Date should be after 1/1/1900";
                }
                return string.Empty;
            }
        }
 
        protected void OnPropertyChanged(string name)
        {
            if (this.PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(name));
            }
        }
 
        public event PropertyChangedEventHandler PropertyChanged;
 
        public void ValidateProperty(string propName, object value)
        {
            var result = new List<System.ComponentModel.DataAnnotations.ValidationResult>();
            Validator.TryValidateProperty(value, new ValidationContext(this, null, null) { MemberName = propName }, result);
 
            if (result.Count > 0)
            {
               throw new ValidationException(result[0].ErrorMessage);
            }
        }
    }
 
 
  public class MyTestClass2 : IDataErrorInfo, INotifyPropertyChanged
  {
 
    private int intVar;
    private string requiredField;
 
    public int IntProp { get; } = 12;
 
    [Required(ErrorMessage = "This field is Required.")]
    public string RequiredField
    {
      get { return requiredField; }
      set
      {
        requiredField = value;
        ValidateProperty("RequiredField", value);
        this.OnPropertyChanged("RequiredField");
      }
    }
 
    private string stringVar;
 
    public string StringProp
    {
      get { return stringVar; }
      set
      {
        stringVar = value;
        this.OnPropertyChanged("StringProp");
      }
    }
 
    private DateTime dateTimeVar;
 
    public DateTime DateTimeProp
    {
      get { return dateTimeVar; }
      set
      {
        dateTimeVar = value;
        this.OnPropertyChanged("DateTimeProp");
      }
    }
 
    [Browsable(false)]
    public string Error
    {
      get { return string.Empty; }
    }
 
    public string this[string columnName]
    {
      get
      {
        if (columnName == "IntProp")
        {
          return this.IntProp < 100 && this.IntProp > 0 ? string.Empty : "Value should be in the range of (0, 100)";
        }
        if (columnName == "StringProp")
        {
          return this.StringProp != null && Regex.IsMatch(this.StringProp, @"^[0-9]+[\p{L}]*") ? string.Empty : @"Value should math the regex: ^[0-9]+[\p{L}]*";
        }
        if (columnName == "DateTimeProp")
        {
          return this.DateTimeProp.Year > 1900 ? string.Empty : "Date should be after 1/1/1900";
        }
        return string.Empty;
      }
    }
 
    protected void OnPropertyChanged(string name)
    {
      if (this.PropertyChanged != null)
      {
        this.PropertyChanged(this, new PropertyChangedEventArgs(name));
      }
    }
 
    public event PropertyChangedEventHandler PropertyChanged;
 
    public void ValidateProperty(string propName, object value)
    {
      var result = new List<System.ComponentModel.DataAnnotations.ValidationResult>();
      Validator.TryValidateProperty(value, new ValidationContext(this, null, null) { MemberName = propName }, result);
 
      if (result.Count > 0)
      {
        throw new ValidationException(result[0].ErrorMessage);
      }
    }
  }
}
 

 

dafadsf

Chris
Top achievements
Rank 1
 answered on 12 Nov 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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?