Telerik Forums
UI for WinForms Forum
6 answers
391 views
OS WINXP
C# .Net 4.0
Telerik 2012.2.726.40

I am displaying/editing RadTreeView Nodes in a RadPropertyGrid.
I'm having a problem with the properties being rounded to two decimal places, where I want to support up to four decimal places.

So lets say I have a property named Length:
/**
 *\brief Gets or sets the name variable.
*\
*/
[DefaultValue ("New User Home"),
DescriptionAttribute ("Name of this User Home Object."),
CategoryAttribute ("(General)")]
public Double Length
{
      get { return Math.Round(_length, 4); }
      set { _length = value; }
}

If I enter 23.4567 into the property grid it rounds it to 23.46.

From this msdn thread I found that you can wrap it into a string and handle the number of decimals from there.
The problems I have with this are:

  1. I shouldn't have to use a cheap trick to determine the accuracy of a number.
  2. When I save the node there are now two lines of XML just for one property, the property that is called in my code, and the wrapper.

What is the correct way to determine the rounding performed on all doubles/floats.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Oct 2019
6 answers
273 views

Hi.

I am using the "Copy" command from the right-click menu and it works OK in copying selected cells to the clipboard and then pasting into another program.

However, I want to copy the entire grid, including column and row headers.

The headers cannot be selected.

Is there a way to copy the entire grid to clipboard?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Oct 2019
16 answers
3.3K+ views
Trying the trial of the Telerik suite for WinForms in Visual Studi 2013, but any time I try to make new Telerik winforms projects I get the same error message when trying to open the form: 

   To prevent possible data loss before loading the designer, the following errors must be resolved:              1 Error         Why am I seeing this page?             Value cannot be null. Parameter name: instance              Instances of this error (1)   1.   Show Call Stack   at System.ComponentModel.TypeDescriptor.AddAttributes(Object instance, Attribute[] attributes)at Microsoft.VisualStudio.Design.VSDesignSurface.CreateDesigner(IComponent component, Boolean rootDesigner)at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)     
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Oct 2019
1 answer
97 views

Sound becomes disabled in other applications (eg youtube, netflix) when webcam is active eg taking snapshot.

Ive observed this using a bluetooth headset and a bluetooth speaker but it doesn't happen if my (HDMI) monitor speaker is outputting sound.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Oct 2019
9 answers
585 views

Hello,

I want to focus specific filter in a radgridview. I tried beginEdit event but i don't want to select text, just focus.

GridView.MasterGridViewInfo.TableFilteringRow.Cells[index].BeginEdit();

 

Focus() on the CellElement doesn't work.

How i can do that ?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Oct 2019
1 answer
401 views

Hello Admins,

 

I'm using one of my form's BorderStyle prperty to none.

When this form is shown no border is displayed.

I want to show only border,

Is it possible to hide only titlebar of the form

or

How to Show the Border/Edges of the form Like in Fluent Theme

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 16 Oct 2019
4 answers
296 views

I noticed that it was possible to embed custom fonts whilst looking at the webcam firstlook demo source code. I'm rewriting a poorly working web cam module, replacing the old code with your new webcam control.

So I found https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/custom-fonts and generated the following code

/// <summary>
/// Add all fonts to [root]\Properties as embedded resources
/// </summary>
public static class FontFactory
{            
  private static FontFamily ReadFontFromManifest(string fontFileName, string fontName)
  {
    #region Code
    try
    {
      var names = Assembly.GetExecutingAssembly().GetManifestResourceNames();
      var root = Assembly.GetExecutingAssembly().GetName().Name;
      var fontStream = Assembly.GetExecutingAssembly().GetManifestResourceStream($@"{root}.Properties.{fontFileName}");
 
      if (fontStream == null) return null;
 
      ThemeResolutionService.LoadFont(fontStream);
      return ThemeResolutionService.GetCustomFont(fontName);
    }
    catch (Exception err)
    {
      Log4Net.Log.Error(err);
      throw;
    }
    #endregion
  }// function
 
  public static FontFamily Font_Awesome_5_Free_Solid
    => ReadFontFromManifest("Font-Awesome-5-Free-Solid-900.otf", Font_Awsome_5_Free_Solid_FontName);
 
  public static string Font_Awsome_5_Free_Solid_FontName
    => "Font Awesome 5 Free Solid";
}

 

I tested the code and it does seem to return a font family. But I want to ask a question about your first look please.

I was trying to find in the firstlook solution any code that matched the suggestion for embedding fonts shown in your documentation, but couldn't. The only mention of the awsome font above was in your form1.cs file for the webcam demo. So is it already part of your component source? When I removed the call to my font factory the closebutton.textelement.customfont still showed what appeared to be "Font Awesome 5 Free Solid";

Thanks. Just trying to understand what to expect :)

Czeshirecat
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 16 Oct 2019
17 answers
505 views

Hello Admins.

Currently I'm using radMenu for displaying and changing the theme at Run time.

Its working fine, but I want to Display the List like in Demo Forms.(Theme Name + its Color Bar).

How can i achieve this UI behavior .

I have check the demo application but unable to find any help.

 

Thank you

Kashif
Top achievements
Rank 1
 answered on 15 Oct 2019
3 answers
323 views
Hi support,

I use grouping in my RadGrid with summary rows.

Is it possible to keep the summary row only at the bottom of the grid and not in the grouping?
I only want the total of the data and I don't want to see the subtotal.

Regards,
Nadia
Nadya | Tech Support Engineer
Telerik team
 answered on 15 Oct 2019
5 answers
463 views

Hi,

I am reading an RTF string from a database and displaying it in a radRichTextEditor. Many of these are multi-line instructions, including many bullet point lists. In order to format this more nicely I wrote the following snippet

 

private void ConfigureDocumentEditor(RadRichTextEditor editor)
        {
            var docEditor = new Telerik.WinForms.Documents.Model.RadDocumentEditor(editor.Document);
             
            editor.Document.Selection.SelectAll();
            docEditor.ChangeFontSize(8);
            docEditor.ChangeParagraphLineSpacing(0.25);
            editor.Document.Selection.Clear();
            editor.IsReadOnly = true;
        }

 

I also set the LayoutMode to "Flow". The problem that I'm running into is that in some instances the data in the DB is just one long string. When I set ChangeParagraphLineSpacing to a value >= 1.0 the word wrap works nicely. When ChangeParagraphLineSpacing  < 1.0 it looks like the attached image. Is there any way to change the spacing so that it applies to paragraph breaks and lists but not the line spacing caused by word wrapping?

 

Thanks

 

Vladislav
Telerik team
 answered on 15 Oct 2019
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
CollapsiblePanel
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?