Telerik Forums
UI for WinForms Forum
1 answer
371 views
When using an object-relational binding with the TreeView control, if the DataSource is set to something, set to null and then set to something again the tree will no longer update.

Here is a code sample:

1. Click Load - the base data appears in the tree.
2. Click Add - a new node appear in the tree.
3. Click Clear - all nodes are erased.
4. Click Load - base data is added back in and appears
5. Click Add - nothing happens...

public partial class Form1 : Form
   {
       BindingList<Thing> RootChildren;
       int currentId = 1;
 
       public Form1()
       {
           InitializeComponent();
       }
 
       private void buttonLoad_Click(object sender, EventArgs e)
       {
           radTreeView1.DataSource = null;
           RootChildren = new BindingList<Thing>();
 
           Thing t1 = new Thing(1, "One");
           Thing t2 = new Thing(2, "Two");
           Thing t3 = new Thing(3, "Three");
           Thing t4 = new Thing(4, "Four");
           currentId = 5;
 
           RootChildren.Add(t1);
           RootChildren.Add(t2);
           RootChildren.Add(t3);
           RootChildren.Add(t4);
 
           radTreeView1.DataSource = RootChildren;
           radTreeView1.ChildMember = @"Children\Children\Children\Children";
           radTreeView1.ValueMember = "Id";
           radTreeView1.DisplayMember = "Name";
       }
 
       private void buttonClear_Click(object sender, EventArgs e)
       {
           radTreeView1.DataSource = null;
       }
 
       private void buttonAdd_Click(object sender, EventArgs e)
       {
           Thing thing = new Thing(currentId, "NewThing" + currentId);
           RootChildren.Add(thing);
           currentId++;
 
           RootChildren.ResetBindings();
       }
   }
 
   public class Thing
   {
       public int Id { get; set; }
       public string Name { get; set; }
       public BindingList<Thing> Children = new BindingList<Thing>();
 
       public Thing() { }
       public Thing(int id, string name)
       {
           Id = id;
           Name = name;
       }
   }
Peter
Telerik team
 answered on 18 Apr 2013
1 answer
236 views
Hi,
I had created rad blank document
this.NotePadTextBox.Document = new RadDocument();
Now i want to set properties like
  • Height & Width
  • LineSpacing
  • LineSpacingType
    • AtLeast - the space between the lines should equal or greater than the value of the LineSpacing property.
    • Auto - the space between the lines is determined automatically.
    • Exact - the space between the lines should equal to the value of the LineSpacing property.
  • PageViewMargin -
  • ParagraphDefaultSpacingAfter 
  • ParagraphDefaultSpacingBefore
  • SectionDefaultPageMargin -
  • Font
I know two of them this.NotePadTextBox.Document.LayoutMode = DocumentLayoutMode.Paged;
            this.NotePadTextBox.Document.SectionDefaultPageMargin = new System.Windows.Forms.Padding(100);
But i don't know how to set rest of them,it is not specified in help file.
Also i want to set default font for newly created document
Svett
Telerik team
 answered on 18 Apr 2013
1 answer
118 views
Treeview will not show the drag indicator dotted lines when using the Visual Studio 2012 Light theme.  This makes it hard to tell exactly where a TreeNode will be dropped.
Peter
Telerik team
 answered on 18 Apr 2013
2 answers
203 views
Hi,

Format: Custom,
CustomFormat: HH:mm
ShowUpDown: True 

In version 2013.1.321.40 when when I set these settings control becomes disabled in designer.








konrad
Top achievements
Rank 1
 answered on 18 Apr 2013
1 answer
303 views
Hello guys,

in my GridView i have a ComboBoxColumn. Is it possible to fire an event when someone clicks on the DropDownArrow ? In addititon the DropDownList should not open because i want to open a new form to select values.

thanks in advance

Markus
Stefan
Telerik team
 answered on 18 Apr 2013
0 answers
173 views
Hi guys,
            i am using textbox with multiline propery and i set accept return property to true. if i press cntrl + a all text in textbox is not selected. please give solution for this.
Mohan
Top achievements
Rank 1
 asked on 17 Apr 2013
3 answers
198 views
I think I have found a bug with the Windows8 theme.  I put a RadDropDownList on my form and set the size to 400,20.  When I run the form the size looks to be reduced to about half the width.  

As a further test, I docked the DropDown to the bottom of a groupBox and you can now see that the border is being resized, you can see the control background itself is fully docked.  Note the Default theme draws the border correctly.

It also seems to truncate longer entries.


Anton
Telerik team
 answered on 17 Apr 2013
1 answer
101 views

Hi, Im working in visuals Studio 2010.
programming in C#

There is a form that i need it to be with a high of 2000 but it doesn't let me make it bigger than 832
the Maximum size property is set to 0
and Autosize = false


In other computer it let me make it of the high i want, but then when I come back to my computer and open it in designer it make the form shorter and cant see the buttons in it.

why?
how to fix it?

thanks
iair

PS: telerik version: 2013.1.220.40
Peter
Telerik team
 answered on 17 Apr 2013
1 answer
182 views
Hi
I used from multicolumncombobox with custom filtering.I don't want to be different 'A' and 'a'.
I used this code but not fix this problem.
MultiCol.editorcontrol.casesensitive=false;
Or
MultiCol.editorcontrol .mastertemplate.casesensitive=false;
how can i fix this problem?
Thank you
Peter
Telerik team
 answered on 17 Apr 2013
1 answer
159 views
Hi,

i'm currently evaluating the Rich Textbox Control and i found some minor bug in it. If you add a hyper link at the beginning of the document and then try to delete it in the editor, an exception is thrown. 

This is how I add the hyper link:
HyperlinkInfo lHyperlinkInfo = new HyperlinkInfo();
lHyperlinkInfo.NavigateUri = "mailto://test@test.de";
radRichTextBox1.InsertHyperlink(lHyperlinkInfo, "Test");

After deleting the hyper link in the editor, the following exception appears:
System.NullReferenceException: FromElement must not be null.
bei Telerik.WinControls.RichTextBox.Model.DocumentElement.CopyPropertiesFrom(DocumentElement fromElement)
bei Telerik.WinControls.RichTextBox.DocumentView.GetCurrentParagraphStyle()
bei Telerik.WinControls.RichTextBox.DocumentView.UpdateCurrentStyles()
bei Telerik.WinControls.RichTextBox.DocumentView.document_DocumentArranged(Object sender, EventArgs e)
bei Telerik.WinControls.RichTextBox.Model.RadDocument.OnDocumentArranged()
bei Telerik.WinControls.RichTextBox.Layout.DocumentLayoutBox.ArrangeOverride(SizeF finalSize)
bei Telerik.WinControls.RichTextBox.Layout.LayoutElement.ArrangeCore(RectangleF finalRect)
bei Telerik.WinControls.RichTextBox.Layout.LayoutElement.Arrange(RectangleF finalRect)
bei Telerik.WinControls.RichTextBox.Layout.ContextLayoutManager.UpdateLayout()
bei Telerik.WinControls.RichTextBox.DocumentPosition.CallOnPositionChanging()
bei Telerik.WinControls.RichTextBox.DocumentPosition.MoveToPreviousInline()
bei Telerik.WinControls.RichTextBox.DocumentPosition.GetPreviousInlineBox()
bei Telerik.WinControls.RichTextBox.Model.RadDocument.IsValidPosition(DocumentPosition p)
bei Telerik.WinControls.RichTextBox.Model.RadDocument.EnsureValidPositionCallback(DocumentPosition p, Func`1 IsMoveForward)
bei Telerik.WinControls.RichTextBox.DocumentPosition.ResumePositionValidation()
bei Telerik.WinControls.RichTextBox.Model.RadDocument.ExecuteCommand(CommandBase command, DocumentCommandContext context)
bei Telerik.WinControls.RichTextBox.DocumentView.Delete(Boolean deletePrevious)
bei Telerik.WinControls.RichTextBox.UI.InputBehavior.ProcessBackKey(KeyEventArgs e)
bei Telerik.WinControls.RichTextBox.UI.InputBehavior.ProcessKeyDown(KeyEventArgs e)
bei Telerik.WinControls.RichTextBox.RadRichTextBox.OnKeyDown(KeyEventArgs e)
bei System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
bei System.Windows.Forms.Control.ProcessKeyMessage(Message& m)
bei System.Windows.Forms.Control.WmKeyChar(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei Telerik.WinControls.RadControl.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Best regards
Martin
Svett
Telerik team
 answered on 17 Apr 2013
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?