Telerik Forums
UI for WinForms Forum
3 answers
103 views
Hi,

I'm using richtextbox with TelerikEditor and have come across the following problem. If I use Text Highlight Color on my text, the highlight color is not saved. ie when reloading the record which was saved in xaml the highlight is gone. Any one else come across this one.

Thanks,
Karl
Stefan
Telerik team
 answered on 21 Mar 2012
2 answers
285 views
I have a TreeView that I would like to display a set of objects where they each contain a list<> or BindingList<> of objects of the same type as the base class. It is a recursive type. I am having a hell of a time getting this list to display anything other than the root list. The more I tinker with the ChildMember or DisplayMember I get either nothing displayed or I get an error:

System.InvalidOperationException was unhandled
  Message=Failed to compare two elements in the array.
  Source=mscorlib
  StackTrace:
       at System.Collections.Generic.ArraySortHelper`1.BinarySearch(T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
       at System.Array.BinarySearch[T](T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
       at System.Collections.Generic.List`1.BinarySearch(Int32 index, Int32 count, T item, IComparer`1 comparer)
       at Telerik.WinControls.UI.BindingProvider.TreeNodeList.GetOrAdd(Object key)
       at Telerik.WinControls.UI.BindingProvider.BuildIndex(Int32 index)
       at Telerik.WinControls.UI.BindingProvider.GetNodes(RadTreeNode parent)
       at Telerik.WinControls.UI.RadTreeNode.get_Nodes()
       at Telerik.WinControls.UI.BindingProvider.Reset()
       at Telerik.WinControls.UI.BindingProvider.root_PropertyChanged(Object sender, PropertyChangedEventArgs e)
       at Telerik.WinControls.UI.RelationBinding.OnPropertyChanged(String propertyName)
       at Telerik.WinControls.UI.RelationBinding.set_DataSource(Object value)
       at Telerik.WinControls.UI.BindingProvider.set_DataSource(Object value)
       at Telerik.WinControls.UI.RadTreeView.set_DataSource(Object value)
       at WorkBreakdownStructure.Forms.frmWorkBreakdownStructureEditor..ctor() in C:\[Development]\CSLA_Research_Program\WorkBreakdownStructure\Forms\frmWorkBreakdownStructureEditor.cs:line 33
       at CSLA_Research_Program.Form1.button2_Click(Object sender, EventArgs e) in C:\[Development]\CSLA_Research_Program\CSLA_Research_Program\Form1.cs:line 29
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at CSLA_Research_Program.Program.Main() in C:\[Development]\CSLA_Research_Program\CSLA_Research_Program\Program.cs:line 18
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: System.ArgumentException
       Message=Argument_ImplementIComparable
       Source=Telerik.WinControls.UI
       StackTrace:
            at Telerik.WinControls.UI.BindingProvider.TreeNodeList.NodeComparer.Compare(Node x, Node y)
            at System.Collections.Generic.ArraySortHelper`1.InternalBinarySearch(T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
            at System.Collections.Generic.ArraySortHelper`1.BinarySearch(T[] array, Int32 index, Int32 length, T value, IComparer`1 comparer)
       InnerException:


This is my code...
Thanks



        public frmWorkBreakdownStructureEditor()
        {
            InitializeComponent();

            this.radTreeView1.ChildMember = @"Things";
            this.radTreeView1.DisplayMember = @"Name";
            this.radTreeView1.DataSource = GetDefaultThings();
        }


        private Things GetDefaultThings()
        {
            Thing t = new Thing("Object 1");
            Thing tc = new Thing("o2");
            t.Things.Add(tc);
            t.Things.Add(new Thing("o3"));
            t.Things.Add(new Thing("o4"));
            t.Things.Add(new Thing("o5"));
            t.Things.Add(new Thing("o6"));
            t.Things.Add(new Thing("o7"));
            tc.Things.Add(new Thing("gc1"));
            tc.Things.Add(new Thing("gc2"));
            tc.Things.Add(new Thing("gc3"));
            tc.Things.Add(new Thing("gc4"));
            Things ts = new Things();
            ts.Add(t);
            ts.Add(new Thing("Object2"));
            ts.Add(new Thing("Object3"));
            ts.Add(new Thing("Object4"));
            ts.Add(new Thing("Object5"));
            return ts;
        }
    }

    public class Things : BindingList<Thing>    {    }

    public class Thing
    {
        public Thing() { }
        public Thing(String name) : this() { _name = name; }

        private String _name = "";
        public String Name
        {
            get { return _name; }
            set { _name = value; }
        }

        private Things _things = new Things();
        public Things Things { get { return _things; } }
    }

Julian Benkov
Telerik team
 answered on 21 Mar 2012
1 answer
154 views
Hi,

I am currently evaluating the radgridview in UNBOUND mode.

I have used .Relations.AddSelfReference which works in my scenario very well

My question is, is it possible to make the indent smaller for the sub rows

+ My Top Row
        My Top Rows Relation #1
        My Top rows Relation #2

I would like to make this indent smaller

+ My Top Row
    My Top Rows Relation #1
    My Top rows Relation #2

Thanks
Stefan
Telerik team
 answered on 21 Mar 2012
1 answer
147 views
Reporting what I think might be a bug.
When using a RadScheduler (2011 Q3) in MonthView, CellClick event of RadScheduler does not fire when a cell (corresponding to a day in monthview) is clicked. It fires only when the smaller day header is clicked.
One can overcome this issue by using RadScheduler MouseClick event like this:
private void radScheduler1_MouseClick(object sender, MouseEventArgs e)
{
   if (radScheduler1.FocusedElement is MonthCellElement)
   {
       //Do Stuff
   }
}
Ivan Todorov
Telerik team
 answered on 21 Mar 2012
1 answer
63 views
Hi im spanish and i apologice beacuse mi enlglish is no so well

The time format in AppointmentEditDialog is in 12 hours and I need see it in 24h
¿who can i chenge it?
Thanks.

Ivan Todorov
Telerik team
 answered on 21 Mar 2012
3 answers
103 views
Hi,

I've been following this example which works great
:
http://www.telerik.com/help/winforms/scheduler-appointments-and-dialogs-drag-and-drop-from-another-control.html

What I would like to do is once I have dropped the appointment I would like the apppointment dialog box to open so I can enter some addtional data. I am also using the CustomEditAppointmentDialog example so I can use my own fields etc.

Is this possible, I've tried firing the _AppointmentEditDialogShowing event but can't pas the appointment details ie times etc it comes up with a invalid cast.

Thanks

Ivan Todorov
Telerik team
 answered on 21 Mar 2012
2 answers
155 views
Hi,

I have problem with GridViewMultiComboBoxColumn. I using the latest version of telerik package (Q1 2012).

I have two objects:

public class Offer
{
  public Guid Id { get; set; }
  public string OfferNo { get; set; }
  public Customer Client { get; set; }
  public DateTime? DateFrom { get; set; }
  public DateTime? DateTo { get; set; }
}
 
public class Customer
{
  public Guid CustomerId { get; set; }
  public string Name { get; set; }
  public string ShortName { get; set; }
}

When i set GridViewMultiComboBoxColumn for "Client" property then I have exception: Converter can't convert.
If I dont't set ValuMember property, then is no exception, byt choose object in grid don't work.

public Form1()
{
    InitializeComponent();
 
    custs = GridData.GetCustomers(5);
 
    IList offers = GridData.GetGridData(custs);
 
    radGridView1.DataSource = offers;
    SetColumns();
}
 
private void SetColumns()
{
    radGridView1.Columns.Clear();
 
    GridViewDataColumn column = null;
    for (int i = 0; i < 4; i++)
    {
        switch (i)
        {
            case 0:
                column = new GridViewTextBoxColumn("Offer no");
                break;
            case 2:
                column = new GridViewDateTimeColumn("Date from");
                break;
            case 3:
                column = new GridViewDateTimeColumn("Date to");
                break;
            case 1:
                column = new GridViewMultiComboBoxColumn("Client");
                ((GridViewMultiComboBoxColumn)column).FieldName = "Client";                       
                ((GridViewMultiComboBoxColumn)column).DataSource = custs;
                ((GridViewMultiComboBoxColumn)column).DisplayMember = "Name";
                ((GridViewMultiComboBoxColumn)column).ValueMember = "CustomerId";
                break;
        }
 
        column.Width = 150;
        column.IsVisible = true;
        column.ReadOnly = false;
 
        radGridView1.Columns.Add(column);
    }
}

What am I doing wrong?

Best Regards
flisak
Top achievements
Rank 1
 answered on 20 Mar 2012
2 answers
207 views
How can I retrieve the Location (ideally the middle of the control) of radListView1.SelectedItem?
Froggie
Top achievements
Rank 1
 answered on 20 Mar 2012
3 answers
215 views
Hi,

What's the best approach to deselect all rows of a WinForms RadGridView when the user clicks on the empty (i.e. blank) area of the containing grid?

(Using RadGridView Q1 2012)

Thanks in advance,
Paolo

Richard Slade
Top achievements
Rank 2
 answered on 20 Mar 2012
8 answers
1.1K+ views

Hello,

  When I create a new report in new project. It shows error as below:
"Could not find type 'Telerik.Reporting.Report'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. "

 
Instances of this error (1)
1.
at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.Error(IDesignerSerializationManager manager, String exceptionText, String helpLink)
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)

Regards,
Saravanan.R

 

Kaustubh
Top achievements
Rank 1
 answered on 20 Mar 2012
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)
Chart (obsolete as of Q1 2013)
Form
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
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?