Telerik Forums
UI for WinForms Forum
4 answers
390 views
Hi,

I want to upload 1 file so I try to find a Find upload control. I checked all telerik controls but didn't find any control about file upload. Is there telerik control used as a file upload ?
Stefan
Telerik team
 answered on 14 Apr 2014
1 answer
158 views
When the DropDownStyle is set to "DropDown" on the RadDropDownList, the control will not accept a <TAB> focus.  The issue appears to be caused by the hosted textbox having its TabStop set to False.  Is this a bug or by design?  

This workaround appears to fix the issue.  Thoughts?
RadDropDownList1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown
 
Dim oTextbox As HostedTextBoxBase
oTextbox = Dropdownlist.DropDownListElement.EditableElement.TextBox.TextBoxItem.TextBoxControl
oTextbox.TabStop = True

Stefan
Telerik team
 answered on 14 Apr 2014
1 answer
273 views
Is there any way to import fonts? Our designer wants us to use Open Sans font. It's not available in Visual Style Puilder or for any Winforms controls.
Stefan
Telerik team
 answered on 14 Apr 2014
1 answer
100 views
Hi,

Apologies if this is a daft question, I usually get involved with web stuff.

We have a MatchLevelID Column in our RadGridView.
The MatchLevelID can either be 0, 1, 2 or 3
What we would like to do is set the background colour of the Cell depending on the MatchLevelID.
To do this, we are subscribing to the CellFormatting Event.
Here is the code we have so far :

private void rgv_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            if (e.CellElement.ColumnInfo.Name == "MatchLevelID")
            {
                var cellInfo = e.CellElement.RowInfo.Cells[e.CellElement.ColumnIndex];

                var matchLevelID = (int) cellInfo.Value;

                switch (matchLevelID)
                {
                    case 0:
                        e.CellElement.BackColor = Color.Red;
                        break;
                    case 1:
                        e.CellElement.BackColor = Color.Orange;
                        break;
                    case 2:
                        e.CellElement.BackColor = Color.Yellow;
                        break;
                    case 3:
                        e.CellElement.BackColor = Color.Green;
                        break;
                }
            }
        }

What is happening is that the background colour is only being set in the MatchLevelID Cell for the Row that the Cursor is hovering over.
As soon as we move the Cursor to another Row the background colour for the new Row is changed and the colour for the old Row is lost.
Ideally we would like the colour to be set for all the Cells in the MatchLevelID Column when the Grid loads.

Any ideas ?
Stefan
Telerik team
 answered on 14 Apr 2014
1 answer
99 views
Now a keypress on "return/enter" in the field description in the dialog of editing appointment will fire the event NotifyCollectionChangedEventHandler.
Can I change this? A keypress on other keys don't fire this event - that's fine.
Dimitar
Telerik team
 answered on 14 Apr 2014
4 answers
160 views
Hello,

i use the "Mutiselect drop down list column" from http://www.telerik.com/support/kb/winforms/gridview/details/mutiselect-drop-down-list-column-in-radgridview
I'm stuck in the implementation of a filter function (Filter must work in combine with other Columns). I found part of codes for custom filter functions and tried to combine them

The basic filter function works already:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls.UI;
using Telerik.WinControls;
using Telerik.WinControls.Data;
using System.Diagnostics;
 
namespace _547099
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
 
            DataTable t = new DataTable();
            t.Columns.Add("ID", typeof(int));
            t.Columns.Add("Name", typeof(string));
            t.Rows.Add(1, "one");
            t.Rows.Add(2, "two");
            t.Rows.Add(3, "three");
            t.Rows.Add(4, "four");
            t.Rows.Add(5, "five");
            t.Rows.Add(6, "six");
            t.Rows.Add(7, "seven");
            t.Rows.Add(8, "eight");
            t.Rows.Add(9, "nine");
            t.Rows.Add(10, "ten");
 
            CustomColumn col = new CustomColumn("MutiSelect column");
            col.Name = "Name";
            col.DataSource = t;
            col.DisplayMember = "Name";
            col.ValueMember = "ID";
            FilterDescriptor descriptor = new FilterDescriptor("Name", FilterOperator.Contains, 0);
            //col.AllowFiltering = false;
             
             
            radGridView1.Columns.Add(col);
 
            GridViewTextBoxColumn col2 = new GridViewTextBoxColumn();
            col2.Name = "Test";
            radGridView1.Columns.Add(col2);
 
            radGridView1.Rows.Add(new object[] { new int[] { 9, 6, 10 }, "ab"});
            radGridView1.Rows.Add(new object[] { new int[] { 5, 1, 3 }, "abcd"});
            radGridView1.Rows.Add(new object[] { new int[] { 8, 7, 1 }, "ef"});
            radGridView1.Rows.Add(new object[] { new int[] { 4, 2, 1 }, "fgh" });
 
            this.radGridView1.EnableFiltering = true;
            this.radGridView1.ShowHeaderCellButtons = true;
            this.radGridView1.EnableCustomFiltering = true;           
            this.radGridView1.CustomFiltering += new GridViewCustomFilteringEventHandler(radGridView1_CustomFiltering);
 
            this.radGridView1.CellEndEdit += new GridViewCellEventHandler(radGridView1_CellEndEdit);
            this.radGridView1.CellValidating += new CellValidatingEventHandler(radGridView1_CellValidating);
            this.radGridView1.FilterExpressionChanged += radGridView1_FilterExpressionChanged;
            
        }
 
        void radGridView1_FilterExpressionChanged(object sender, FilterExpressionChangedEventArgs e)
        {
            Debug.WriteLine("Filter geändert: " + e.FilterExpression);           
        }
 
        void radGridView1_CellValidating(object sender, CellValidatingEventArgs e)
        {
            if (radGridView1.ActiveEditor == null ||!( e.Row is GridViewFilteringRowInfo)) return;
 
            if (e.Column.GetDefaultEditorType() == typeof(CustomDropDownListEditor))
            {
                filterValues.Clear();
                foreach (CustomListDataItem item in ((CustomEditorElement)(((CustomDropDownListEditor)(this.radGridView1.ActiveEditor)).EditorElement)).Items)
                {
                    if (item.Selected)
                    {
                        filterValues.Add((int)item.Value);
                    }
                }
            }
        }
 
        List<int> filterValues = new List<int>();
        void radGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
        {
            Debug.WriteLine("Refresh");
            this.radGridView1.MasterTemplate.Refresh();
        }       
         
        private void radGridView1_CustomFiltering(object sender, GridViewCustomFilteringEventArgs e)
        {
            if (filterValues.Count == 0)
            {               
                Debug.WriteLine("FilterVal 0");
                int fdi = radGridView1.FilterDescriptors.IndexOf("Name");
                if (fdi != -1)
                {
                    radGridView1.FilterDescriptors.RemoveAt(fdi);
                }
            }
 
            if (radGridView1.FilterDescriptors.Count == 0)
            {
                return;
            }
 
            if (filterValues.Count > 0)
            {               
                bool shouldVisible = false;
                foreach (int cellValue in ((int[])e.Row.Cells["Name"].Value))
                {
                    foreach (int j in filterValues)
                    {
                        if (cellValue == j)
                        {
                            shouldVisible = true;
                            break;
                        }
                    }
                }
                e.Visible = shouldVisible;
            }
 
            if (e.Visible) e.Handled = false;
        }
    }
}

So i can filter in custom column "Name" (MultiSelectDropdownColumn) and also in Column2 "Test" (TextboxColumn). good so far

After i filtered something in Column "Test" followed by clear this filter, i try to filter in custom column "Name" again but this time the filter don't work (all Rows will hidden or only one matching row will shown).

Does anyone have any idea where the fault lies?
Martin
Top achievements
Rank 1
 answered on 12 Apr 2014
2 answers
141 views
Hi telerik!

I have two problems

(1) How do i set the weekMonthView's first day to monday ? 

(2) What trigger event can reload data in radSchedule when i clicked the radSchedulerNavigator1's today button ?
Cooper
Top achievements
Rank 1
 answered on 11 Apr 2014
1 answer
88 views
I'm trying to figure out why charting a LineSeries is so innaccurate. It seems like big spikes are causing some sort of pointy artifact that makes the max value seem higher than it really is.

Take for instance the first attachment, "Innaccurate1.png", where the data series is [0,0,0,0,0,0,0,0,0,0,1,0,0,0]

It appears to go over the y-axis grid line marking "1".

The second attachment, "Innaccurate2.png", shows how this effect is amplified as the chart control is shrunk. The spike now appears nearly over the gridline marking the value 2, though the same dataseries (with max value of 1) is still being charted.

This difference between the data max and the visual max isn't always <1 either. When charting a line series with a max value of ~1980, and a max Y-Axis value of 2000, the spike appears to go off the top of the chart. An error of more than 20 units!

Is there some way to solve this visual error to more accurately display my data?
George
Telerik team
 answered on 10 Apr 2014
6 answers
149 views
Hi Telerik
I would like to be able to add a Multi select combobox column to GridView.

Would you guys be able to update the code example in the thread at http://www.telerik.com/community/forums/winforms/gridview/multi-select-combobox-column.aspx to reflect the changes needed to work in Q1 2011?

Many thanks in advance
Regards
Ian Carson
Stefan
Telerik team
 answered on 10 Apr 2014
2 answers
256 views
On the Context Menu Showing Event of radScheduler,
I clear the current context menu then add some other RadMenuItems depending on the scenario.

on the first right click, the context menu shows.

but after right clicking anywhere on the RadScheduler (in any ActiveViewType)
the program crashes.

I got this error.

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index)
   at Telerik.WinControls.RadItemCollection.get_Item(Int32 index)
   at Telerik.WinControls.UI.MonthViewAreaElement.Scheduler_MouseDown(Object sender, MouseEventArgs e)
   at Telerik.WinControls.UI.MonthViewAreaElement.HandleSchedulerMouseDown(MouseEventArgs e)
   at Telerik.WinControls.UI.RadSchedulerElement.scheduler_MouseDown(Object sender, MouseEventArgs e)
   at System.Windows.Forms.Control.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.RadControl.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.UI.RadScheduler.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.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 ICAM.Global.Main() in D:\TFS 20131025\ICAM4\ICAM4_v2\ICAM\Global.cs:line 151



Global.cs:line 151 is Application.Run(Form mainForm)
succeeding details show that it is on the library. 

I put a break point on the first line of ContextMenuShowing, but error occurs right before it reaches the breakpoint.

I am using Telerik Q1 2014 for WinForms.
Could you help me solve this? Or am I missing some restrictions on using context menu in RadScheduler?

Thanks!




Stefan
Telerik team
 answered on 10 Apr 2014
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
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
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
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?