Telerik Forums
UI for WinForms Forum
5 answers
246 views
What would be the best way to print a RadCalendar?  Ideally, I could throw a read-only version of the calendar I created on a report.

The function of my current sub-project is to print out an on-call schedule each month (to be passed around to various departments, etc.).  The entry form allows the user to double click a day in the calendar and add an assignment ... and that form looks good.  Now I go to print it, and I can't find anything on RadCalendar that allows for printing or easy export to PDF/DOC/image, and I go to Reporting and there is nothing that is easily time-based.

I could create a report kludge of generic textboxes for each possible permutation of the calendar, then do the computations to figure out which box goes in which, then fill it out, but ... geez.  Surely there is a built-in way to do this that I'm missing.

Thoughts?
Peter
Telerik team
 answered on 17 Apr 2012
1 answer
124 views
Hello,
I am trying to do SelfReference and adding relation together in the grid.
I have 2 collection: ProjectTemplate and ProjectTask. Each of these 2 contains selfreference 2 each other and they also have relation between them.Checkout code snipet below.
Note: "ProjectContract" is datacontract containing these 2 collection.
"ProjectContract.TemplateContracts" is ProjectTemplate Collection and"ProjectContract.TaskContracts" is ProjectTask Collection.
radGridView1.MasterTemplate.DataSource = ProjectContract.TemplateContracts;
 radGridView1.MasterTemplate.Templates.Add(new GridViewTemplate() { DataSource = ProjectContract.TaskContracts });
 radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "ProjectTemplateId", "ParentProjectTemplateId");
 radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate.Templates[0], "ProjectTaskId", "ParentProjectTaskId");
 var relation = new GridViewRelation(radGridView1.MasterTemplate, radGridView1.MasterTemplate.Templates[0])
     {
     RelationName = "TemplateTask"
     };
relation.ParentColumnNames.Add("ProjectTemplateId");
relation.ChildColumnNames.Add("ParentProjectTemplateId");
radGridView1.Relations.Add(relation);

I am getting somewhat desirable result. I am getting self hierarchy of ProjectTemplate and relation of template and task. But i am unable to get self hierarchy of Project Task.
Please checkout image attached below for more clarification.

Thanks,
Julian Benkov
Telerik team
 answered on 17 Apr 2012
3 answers
416 views
Hello!
I have a problem with RadMultiColumnCombobox.
I'm using Telerik Control Q2 2011 and VS 2010.
I have a form like the below code:

            Form f1 = new Form();
            RadDock rd1 = new RadDock();
            rd1.Dock = DockStyle.Fill;
            DocumentWindow dw1 = new DocumentWindow();
            rd1.AddDocument(dw1);
            DocumentWindow dw2 = new DocumentWindow();
            rd1.AddDocument(dw2);
            RadMultiColumnComboBox cbx1 = new RadMultiColumnComboBox();
            dw1.Controls.Add(cbx1);
            cbx1.DataSource = GetAllCountries(); (I get list items in the database)
            f1.Controls.Add(rd1);
            f1.Show();

When I select one item in cbx1 and do a drag-drop action in dw1, cbx1 will always automatically select the first item.
If anyone has a suggestion, please let me know.

Thanks!

Svett
Telerik team
 answered on 17 Apr 2012
3 answers
131 views
Hi,

I have a text inside a cell, composed of two dates. What I want is to format first date and the second one with different colors and size.

Thanks
Stefan
Telerik team
 answered on 17 Apr 2012
1 answer
660 views
Hi,

I have an RadDropDownList filled with some items using DataSource and bounded functionality.
When I in the SelectedIndexChanged event tries to reset the selectedvalue to the original (the one before i changed), the control simply wont listen to my commands ;) 

This is the code I use in the SelectedIndexChanged event:
void AgreementRadDropDownSelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
{
    if (_init || _selectedAgreement == (int)AgreementRadDropDown.SelectedValue) return;
 
    if (MessageBox.Show("Do you want to change the agreement?", "Change Agreement", MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.No)
    {
        AgreementRadDropDown.SelectedValue = _selectedAgreement;
        return;
    }
    _selectedAgreement = (int)AgreementRadDropDown.SelectedValue;
}

The rest of the code of the form is here:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Forms;
using Telerik.WinControls.UI;
 
namespace TestDropDownList
{
    public partial class Form1 : Form
    {
        private readonly IList<Agreement> _agreements = new List<Agreement>();
        private int _selectedAgreement;
        private readonly bool _init = false;
 
        public Form1()
        {
            _init = true;
            InitializeComponent();
            AgreementRadDropDown.ItemDataBound += AgreementRadDropDownItemDataBound;
            AgreementRadDropDown.SelectedIndexChanged += AgreementRadDropDownSelectedIndexChanged;
            LoadAgreements();
            _selectedAgreement = 2;
 
            AgreementRadDropDown.SuspendUpdate();
            AgreementRadDropDown.DisplayMember = "Name";
            AgreementRadDropDown.ValueMember = "Id";
            AgreementRadDropDown.DataSource = _agreements;
 
            AgreementRadDropDown.SelectedValue = _selectedAgreement;
            AgreementRadDropDown.ResumeUpdate();
            _init = false;
        }
 
        void AgreementRadDropDownSelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
        {
            if (_init || _selectedAgreement == (int)AgreementRadDropDown.SelectedValue) return;
 
            if (MessageBox.Show("Do you want to change the agreement?", "Change Agreement", MessageBoxButtons.YesNo,MessageBoxIcon.Question) == DialogResult.No)
            {
                AgreementRadDropDown.SelectedValue = _selectedAgreement;
                return;
            }
            _selectedAgreement = (int)AgreementRadDropDown.SelectedValue;
        }
 
        private void LoadAgreements()
        {
            _agreements.Add(new Agreement(1, "Agreement1", Properties.Resources._lock));
            _agreements.Add(new Agreement(2, "Agreement2", Properties.Resources._lock));
            _agreements.Add(new Agreement(3, "Agreement3", Properties.Resources.lock_unlock));
            _agreements.Add(new Agreement(4, "Agreement4", Properties.Resources._lock));
            _agreements.Add(new Agreement(5, "Agreement5", Properties.Resources.lock_unlock));
            _agreements.Add(new Agreement(6, "Agreement6", Properties.Resources._lock));
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
             
        }
 
        static void AgreementRadDropDownItemDataBound(object sender, ListItemDataBoundEventArgs args)
        {
            var item = args.NewItem.DataBoundItem as Agreement;
            if (item != null)
                args.NewItem.Image = item.StatusImage;
        }
    }
 
    public class Agreement
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public Image StatusImage { get; set; }
 
        public Agreement(int id, string name, Image statusImage)
        {
            Id = id;
            Name = name;
            StatusImage = statusImage;
        }
    }
}
namespace TestDropDownList
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.AgreementRadDropDown = new Telerik.WinControls.UI.RadDropDownList();
            ((System.ComponentModel.ISupportInitialize)(this.AgreementRadDropDown)).BeginInit();
            this.SuspendLayout();
            //
            // AgreementRadDropDown
            //
            this.AgreementRadDropDown.DropDownAnimationEnabled = true;
            this.AgreementRadDropDown.Location = new System.Drawing.Point(48, 37);
            this.AgreementRadDropDown.Name = "AgreementRadDropDown";
            this.AgreementRadDropDown.ShowImageInEditorArea = true;
            this.AgreementRadDropDown.Size = new System.Drawing.Size(222, 20);
            this.AgreementRadDropDown.TabIndex = 0;
            this.AgreementRadDropDown.Text = "radDropDownList1";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(318, 167);
            this.Controls.Add(this.AgreementRadDropDown);
            this.Name = "Form1";
            this.Text = "Form1";
            this.Load += new System.EventHandler(this.Form1_Load);
            ((System.ComponentModel.ISupportInitialize)(this.AgreementRadDropDown)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadDropDownList AgreementRadDropDown;
    }
}


I use two images in my project.. they are attached here and need to be added to the resource file of the project to make this look like the one i have here :)

What am i doing wrong?

Regards
Svein Thomas
Peter
Telerik team
 answered on 17 Apr 2012
1 answer
186 views
Hi, I have a wizard running as part of a custom add-in for Outlook 2010. In one of the wizard dialogs I have a Telerik GridView control. The wizard dialog window that contains the Grid is re-sizable and I would like to have the Telerik Grid dynamically resize as the user re-sizes the Wizard dialog.

Any suggestions on how to achieve this would be greatly appreciated.

Thanks
Gary
Stefan
Telerik team
 answered on 17 Apr 2012
2 answers
186 views
Hi all,

I have a RadStatusStrip control, with inside 10 RadImageButtonElement controls (named BC0, BC1,BC2,BC3 etc) and a array with images (named Img())

How can I change the images of the RadImageButtonElement in a loop ?

Something this :

For I as Integer = 0 to 9 
      BC+i.tostring .image=img(i)
next I

I tryed to use :
    me.controls("BC"&i.tostring).image=img(i)   but it don't work !

Thanks

Stefan
Telerik team
 answered on 17 Apr 2012
1 answer
245 views
When I run the clickonce on the client computer, I am getting the following error in the error log:

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\snapshot\Deploy\ABC.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly Telerik.WinControls.dll.

I have set my references to copy local, and put Include in the application files section of Click Once. What am I doing wrong?  btw, I am a trial user and hoping to purchase soon.

Thanks
Stefan
Telerik team
 answered on 16 Apr 2012
1 answer
144 views
Hi,
Congrats on your lovely gridview control.
That is exactly what many people needed and i'm sure that you will continuing with many new features.
In my view it will be great to implement the full combobox functionality  on the gridview column. I mean the filtering and autocomplete functionality as well. May be there is a way but i can not find it, so please let me know.
Regards,
Simeon
Stefan
Telerik team
 answered on 16 Apr 2012
2 answers
165 views
I don't know why you can allow such a strange behavior of RadGridView to be existed for so long.
Initally, after data-binding, the first row will be selected, that's fine, some row has to be selected anyway, however, in this case, it IS NOT highlighted? Don't you think that it may confuse user? ("What the hell these data come from, I didn't select anything, it didn't say that I select anything, what's going on?")

I would like to have solution for it: Either disable first row select after data-binding (I didn't see any "SelectedIndex" so that I can set it to -1), or have the first row be highlighted as it is selected.

Thanks

Lamk.
Stefan
Telerik team
 answered on 16 Apr 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)
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?