Telerik Forums
UI for WinForms Forum
1 answer
183 views
Hi,
I keep getting the Error Cannnot convert type 'object' to 'System.Drawing.Image' on the line

element.Image = global::TelerikEditor.Properties.Resources.ResourceManager.GetObject(currCountry)

How would I change this?

private void LoadFlags( Telerik.WinControls.UI.RadDropDownList myDLL, Array Cntrys)
{
    myDLL.Items.Clear();
    foreach (string currCountry in Cntrys)
    {
        RadListDataItem element = new RadListDataItem();            
        element.Text = currCountry;
        element.Image = global::TelerikEditor.Properties.Resources.ResourceManager.GetObject(currCountry);
        element.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
        myDLL.Items.Add(element);
    }
}
Karl
Top achievements
Rank 1
 answered on 17 Apr 2012
1 answer
134 views
My issues are 2 fold... first, I've created a Custom appointment dialog by implementing the EditAppointmentDialog.  My recurrence button is turned on and I can use that interface to set the recurrence properties.  When I try to save the data during the ApplySettingsToEvent() event, all of my Recurrence propertes in the targetEvent (RecurrencRule, RecurrenceId) are null.  But, in the UI on the radScheduler the recurring appointments show correctly.  How do I retrieve my recurrence information so that I may persist this data?

My second issue is that I also have a custom appointment object that enherits from Telerik.WinControls.UI.Appointment.   In my radScheduler1_AppointmentEditDialogShowing() event I receive an error of "Unable to cast object type of 'Telerik.WinControls.UI.Appointment' to type 'CoachDashboard.CustomAppointment'".  My CustomAppointment class inherits from Telerik.WinControls.UI.Appointment.  Why would I get this error?  The only difference is that this appointment is a recurring appointment now.  It works fine when I don't set any recurrence.

Ivan Todorov
Telerik team
 answered on 17 Apr 2012
1 answer
215 views
Hello,

I would like to have my gridview cell contents wrap. When I set the column WrapText = true there is no padding around the cells and the text hits the border.

I tried setting the cell padding using the CellFormatting event but then the WrapText doesn't happen and the cell uses ellipse.

Can I have both?

Thanks,
Beth

This does not work

void radGridView_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            e.CellElement.Padding = new Padding(3, 3, 5, 3);
            if (e.ColumnIndex != 0)
            {
                e.Column.WrapText = true;
            }
        }
Stefan
Telerik team
 answered on 17 Apr 2012
6 answers
137 views
Hi everyone,
I am using radGrid to exibit information of people! one of the fields is Mobile that is thought to be Numeric and limited digits. So I am using GridviewMaskboxColumn by following code :

GridViewMaskBoxColumn mobileColumn = new GridViewMaskBoxColumn();
            mobileColumn.HeaderText = "Mobile#";
            mobileColumn.MaxLength = 10;
            mobileColumn.FieldName = "MobileNo";
            mobileColumn.MaskType = MaskType.Numeric;
            mobileColumn.Mask = "G";
            grid.Columns.RemoveAt(10);
            grid.MasterTemplate.Columns.Insert(10, mobileColumn);

Everything's fine but The Maxlength doesn't work! I mean when you want to edit MobileNo, you can enter digits more than 10!
Any ideas?!

Thanks
Peter
Telerik team
 answered on 17 Apr 2012
1 answer
137 views
Hi,

I am using a RadPropertyGrid and have set the SelectedObject to be an object with a DateTime property. I would like this DateTime property to be displayed using en-GB culture (formatted as dd/MM/yyyy) but I cannot find a way to change this from the default MM/dd/yyyy.

I assume that I'm missing something fairly obvious! Any help would be much appreciated.

Thanks,

Chris.
Ivan Petrov
Telerik team
 answered on 17 Apr 2012
1 answer
134 views
I am implementing drag and drop operations between 2 radlistboxes based on the demo with the DragDropManager...
The implementation works fine but i run into a problem when there are more items in the list than the visible area...
specifically getting the upperbound of the visualitem
source code from demo is...

int UpperBound = visualReplacedItem.Bounds.Height * this.targetListBox.Items.IndexOf(this.replacedItem);

the problem is the second part (index of) could return a large number when a list contains 200 items causing the feedback form to draw off the visible area...

is there a visualitems index or something i can reference instead to keep the feedback form in the visible area of the RadListBox?

My feel is that even the demo would not work properly if the lists contained enough items to cause scrolling...
Peter
Telerik team
 answered on 17 Apr 2012
5 answers
187 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
74 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
348 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
79 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
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
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
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?