Telerik Forums
UI for WPF Forum
1 answer
109 views

Hello, I am using a single page RadDataForm to send information to an outside API. I've gone through the getting started sections of the documentation but have had issues finding anything in regards taking the data from the active sheet of the form to go elsewhere. I know that binding data to the form is as easy as this.DataForm1.CurrentItem = Customer.defaults() and I can get my data onto the form. What I don't understand is how to do anything with that data once I've altered it or written over it. I have created a separate button that should submit an API post call with this information and clear the fields to be blank so another customer can be added.

Any help would be greatly appreciated.

 

Stefan
Telerik team
 answered on 22 Jul 2016
1 answer
269 views
Hello,

I have a RadComboBox with Style="{DynamicResource RadComboBoxWithCheckBox} . However when i enable the property IsEditable="True" the checkbox disappears.

Can I have the checkbox still show on the dropdown with IsEditable on? I've attached a screenshot with IsEditable set to false and true.

Thanks!
Yana
Telerik team
 answered on 22 Jul 2016
0 answers
56 views

Im able to export the contents of radgridview to PDF, however I want to mail the contents as PDF attachment in outlook without saving it on my system

How to achieve this?

Praneeth
Top achievements
Rank 1
 asked on 22 Jul 2016
1 answer
72 views

I have table x  in a database having around 30 columns with 6000 records.

When bind this table data in xaml using a class representation say List<X>, then on Export I get a Out of Memory Exception.

But when I Export the same table data using DataTable, then I do not get any exception.

I wanted to the reason behind this behavior ?

 

 

Stefan Nenchev
Telerik team
 answered on 21 Jul 2016
1 answer
370 views

I need to have formatted numbers in RadGridView, my columns looks like below:

<telerik:GridViewDataColumn DataMemberBinding="{Binding MarketValue}"
                                          DataFormatString="n2">
                  <telerik:GridViewDataColumn.CellEditTemplate>
                      <DataTemplate>
                          <TextBox Text="{Binding MarketValue, StringFormat=n2}"></TextBox>
                      </DataTemplate>
                  </telerik:GridViewDataColumn.CellEditTemplate>
</telerik:GridViewDataColumn>

based on this post: http://www.telerik.com/forums/numeric-input-with-decimals-in-gridviewmaskedinputcolumn#oNu7_qiNFkS-vjfxCML3sQ

 

I want to have an opportunity to copy multiple cells from the Grid and paste them into excel file or notepad and it works out-of-th-box.

Unfortunately I cannot reverse it - I cannot change some values in excel file, copy them and paste into RadGridView. Is there any way to do it easily?

 

Stefan Nenchev
Telerik team
 answered on 21 Jul 2016
1 answer
249 views

Hi guys!

I was tasked with finding a way to rewrite our old WinForms app to WPF (due to some experience with it in time long past), with special attention for PropertyGrid controls. Decided to go with Telerik and to my surprise it has the same problem as most open source solutions, namely: when binding to PropertyBag containing enum definitions, enum values are not selected in the dropdowns - the options are there, just unselected. I'm pretty sure I do something wrong, so I'd appreciate a look at the code and some tips. Code for View, ViewModel and CustomProperty/Descriptor can be found below:

View:

1.<Window.Resources>
2.        <my:MyViewModel x:Key="MyViewModel"/>
3.    </Window.Resources>
4.    <Grid DataContext="{StaticResource MyViewModel}">
5.        <telerik:RadPropertyGrid HorizontalAlignment="Left" Name="radPropertyGrid1" VerticalAlignment="Top" Height="452" Width="465" Item="{Binding Collection}"/>
6.    </Grid>

ViewModel:

01.public class MyViewModel : INotifyPropertyChanged
02.    {
03.        public event PropertyChangedEventHandler PropertyChanged;
04.        ObservableCollection<CustomProperty> cpList = new ObservableCollection<CustomProperty>()
05.        {
06.            new CustomProperty { Name = "Foo", Desc = "Test", Type = typeof(int), Value1 = 0 },
07.            new CustomProperty { Name = "Foo2", Desc = "Test2", Type = typeof(int), Value1 = 1 },
08.            new CustomProperty { Name = "Foo3", Desc = "Test3", Type = typeof(WpfApplication1.Enum), Value1 = WpfApplication1.Enum.Value2 }
09.        };
10. 
11.        public PropertyBag Collection
12.        {
13.            get
14.            {
15.                return new PropertyBag(cpList);
16.            }
17.        }
18. 
19.        private object selectedItem;
20.        public object SelectedItem
21.        {
22.            get { return this.selectedItem; }
23.            set
24.            {
25.                if (value != this.selectedItem)
26.                {
27.                    this.selectedItem = value;
28.                    this.OnPropertyChanged("SelectedItem");
29.                }
30.            }
31.        }
32. 
33.        protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
34.        {
35.            PropertyChangedEventHandler handler = this.PropertyChanged;
36.            if (handler != null)
37.            {
38.                handler(this, args);
39.            }
40.        }
41. 
42.        private void OnPropertyChanged(string propertyName)
43.        {
44.            this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName));
45.        }
46.    }

CustomProperty/Descriptor:

001.public enum Enum
002.    {
003.        Value1 = 1,
004.        Value2 = 2
005.    }
006. 
007.    public class CustomProperty
008.    {
009.        public string Name { get; set; }
010.        public string Desc { get; set; }
011.        public object DefaultValue { get; set; }
012.        public object Value1
013.        {
014.            get { return currentValue; }
015.            set
016.            {
017.                currentValue = value;
018.            }
019.        }
020. 
021.        Type type;
022.        public Type Type
023.        {
024.            get
025.            {
026.                return type;
027.            }
028.            set
029.            {
030.                type = value;
031.                DefaultValue = Activator.CreateInstance(value);
032.            }
033.        }
034. 
035.        private bool        validate;
036.        private PropertyBag     subProperty;
037.        private object      currentValue;
038. 
039.        private string GetText(string textId)
040.        {
041.            return textId;
042.        }
043. 
044.        public string Id
045.        {
046.            get { return string.Empty; }
047.        }
048. 
049.        public string Category
050.        {
051.            get { return "Category"; }
052.        }
053. 
054.        public string Hint
055.        {
056.            get
057.            {
058.                return "Hint";
059.            }
060.        }
061. 
062.        public bool UpperCase
063.        {
064.            get { return false; }
065.        }
066. 
067.        public string EditorTypeName
068.        {
069.            get { return "Naaah"; }
070.        }
071. 
072.        public string DropDownEditor
073.        {
074.            get { return "Uh-uh"; }
075.        }
076. 
077.        public string Caption
078.        {
079.            get { return Name; }
080.        }
081. 
082.        public string TypeName
083.        {
084.            get { return type.ToString(); }
085.        }
086. 
087.        public bool PermanentReadOnly
088.        {
089.            get { return false; }
090.        }
091. 
092.        public bool ReadOnly
093.        {
094.            get { return false; }
095.        }
096. 
097.        public string MinValue
098.        {
099.            get { return ""; }
100.        }
101. 
102.        public string MaxValue
103.        {
104.            get { return "0"; }
105.        }
106. 
107.        public bool Validate
108.        {
109.            get { return validate; }
110.        }
111. 
112.        public PropertyBag SubProperty
113.        {
114.            get {return subProperty;}
115.            set {subProperty = value;}
116.        }
117. 
118.        public int SortOrder
119.        {
120.            get { return 0; }
121.        }
122. 
123.        public bool Hide
124.        {
125.            get { return false; }
126.        }
127. 
128.        public string DevTypeConverter
129.        {
130.            get { return "None"; }
131.        }
132. 
133.        public string GetAttribute(string key)
134.        {
135.            return "";// this.deviceData != null ? this.deviceData.GetAttribute(key) : null;
136.        }
137.    }
138. 
139.    public class CustomPropertyDescriptor : PropertyDescriptor
140.    {
141.        public CustomProperty pSpec = null;
142.        public PropertyBag pBag;
143. 
144.        public CustomPropertyDescriptor(CustomProperty cp, PropertyBag pb, Attribute[] attrs) : base(cp.Name, attrs)
145.        {
146.            pSpec = cp;
147.            pBag = pb;
148.        }
149. 
150.        public override Type ComponentType
151.        {
152.            get { return typeof(CustomProperty); }
153.        }
154. 
155.        public override object GetValue(object component)
156.        {
157.            if (pSpec.DefaultValue is System.Enum)
158.                return (int)pSpec.Value1;
159.            return pSpec.Value1;
160.        }
161. 
162.        public override bool IsReadOnly
163.        {
164.            get { return false; }
165.        }
166. 
167.        public override Type PropertyType
168.        {
169.            get
170.            {
171.                return pSpec.Type;
172.            }
173.        }
174. 
175.        public override void ResetValue(object component)
176.        {
177.            SetValue(component, pSpec.DefaultValue);
178.        }
179. 
180.        public override void SetValue(object component, object value)
181.        {
182.            pSpec.Value1 = value;
183.        }
184. 
185.        private string GetText(string textId)
186.        {
187.            return textId;
188.        }
189. 
190.        public string GetPropId
191.        {
192.            get
193.            { return pSpec.Id; }
194.        }
195. 
196.        public override string Category
197.        {
198.            get
199.            {
200.                return pSpec.Category;
201.            }
202.        }
203. 
204.        public override string DisplayName
205.        {
206.            get
207.            {
208.                return pSpec.Caption;
209.            }
210.        }
211. 
212.        public override string Description
213.        {
214.            get
215.            {
216.                return pSpec.Hint;
217.            }
218.        }
219. 
220.        public override bool IsBrowsable
221.        {
222.            get
223.            {
224.                return true;
225.            }
226.        }
227. 
228.        public override bool CanResetValue(object component)
229.        {
230.            return false;
231.        }
232. 
233.        public override bool ShouldSerializeValue(object component)
234.        {
235.            if (pSpec.TypeName == "BoolDefined")
236.            {
237.                if (pSpec.Value1 == null)
238.                    return false;
239.                if (pSpec.Value1.ToString().Length > 0)
240.                    if (Convert.ToBoolean(pSpec.Value1, CultureInfo.InvariantCulture))
241.                        return true;
242.            }
243.            return false;
244.        }
245.    }

Thanks in advance for any help you can offer:)

Rafał
Top achievements
Rank 1
 answered on 21 Jul 2016
41 answers
539 views
I have a fairly simple scenario, where a RadCarousel's ItemsSource is databound to an ObservableCollection of items in the ViewModel. The RadCarousel specifies a simple item template that shows a button image with text below it. The RadCarousel is using all default options and styles other than that ItemTemplate.

The problem I witness is that when the view loads, the RadCarousel appears to be empty, although I have a single item in my ObservableCollection. If I scroll the RadCarousel or use the navigation buttons, the single item pops into view and does appear normally.

Has anyone else ever seen this behavior?

For record, I'm using WPF 4 with the Q3 2011 release (2011.3.1116.40)

EDIT: I've also tried this with multiple items in the collection. The same behavior is exhibited.

Thanks in advance...
-Tony
Melissa
Top achievements
Rank 2
 answered on 20 Jul 2016
10 answers
1.4K+ views
In DatePicker and TimePicker i don't want to allow user to enter date manually, he should be restricted to use the calendar to change the date, how can I do this?

There should be a property like IsEditable to do this!
Ruiz
Top achievements
Rank 1
 answered on 20 Jul 2016
4 answers
332 views

It seems that all what the IsGrouped property does is decide if the properties appeared as grouped or not, and clicking on A-Z doesn't sort them from A-Z (unlike for example in Visual Studio).

I've created an example where the item is:

public class MyClass
{
    [Display(Name="A-Name", GroupName="Group2", Order=9)]
    public string AName { get; set; }
 
    [Display(Name="B-Name", GroupName="Group2", Order=7)]
    public string BName { get; set;}
 
    [Display(Name = "C-Name", GroupName = "Group2", Order = 8)]
    public string CName { get; set; }
 
    [Display(Name = "D-Name", GroupName = "Group1", Order = 3)]
    public string DName { get; set; }
 
    [Display(Name = "E-Name", GroupName = "Group1", Order = 2)]
    public string EName { get; set; }
 
    [Display(Name = "F-Name", GroupName = "Group1", Order = 1)]
    public string FName { get; set; }
 
}

 

When the A-Z button is selected, the properties are ordered as:

F-Name

E-Name

D-Name

B-Name

C-Name

A-Name

 

 

Just like the order I've defined. But with any other normal property grid, the order only affects the items when they are grouped.

The visibility of these buttons is called "SortAndGroupButtonsVisibility", so theoretically, this button should have sorted the properties alphabetically.

 

Stefan Nenchev
Telerik team
 answered on 20 Jul 2016
1 answer
67 views

Hi,

I'm unable to get the dialogs to show up while using implicit theming with Office2013. Please see the attached image and zip file with the sample solution.

I made sure to include the required DLLs and use MEF loading. Can you please indicate what's missing?

Without the dialogs the word processor cannot be used.

Thanks

aronluc28
Top achievements
Rank 1
 answered on 20 Jul 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?