Telerik Forums
UI for WinForms Forum
1 answer
112 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
199 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
160 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
102 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
164 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
281 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
1 answer
179 views
Helloes,im new to telerik as im a designer recently joined a group of c# coders and  such
im working on a certain software tabs which has similarities to google chrome tab design...i.e icon to the left and Close button to the right...however i cannot manage to align the icon to the left...
if you would be so kind to explain if its possible within Teleriks abilities ill be greatful. :)
im using Telerik Q3 2013 
thank you in advance :)
ps 
anything ive done has resulted in both close and icon to the right,but my text is right to left as im working on an arabic software,and i dont want both the icon of the tab and the close button to its right...
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Apr 2014
26 answers
860 views
hi,

1. In my case, I need to update the cells using API in the selectedrows, but when i update anyone cell, the collection (selectedrow) will be change to null, and fire some error.

how can i solve this problem ?

2. Can I set a cell be a auto row height, when i set the wraptext is true ?
George
Telerik team
 answered on 09 Apr 2014
2 answers
189 views
I need a dropdown column in my grid which simply lists "Y", and "N".

How can I simply add these values to the dropdown's items in the designer, or at run time?
Kipp
Top achievements
Rank 1
 answered on 08 Apr 2014
4 answers
193 views
Hi, I have a WinForms project that uses ClickOnce for the installation process, I've updated the project to version v. 2014.1.226.40, and in the Project Configuration Wizard the EQATEC.Analytics.Monitor checkbox is NOT checked. After publishing, I copied the setup files to the shared folder of the PC where the files are going to be held for user installation purposes. After trying to test the app, it says that I need to install EQATEC stuff in GAC, I sincerely don't need/want any of this information on the project, so I'm trying to remove the "reference"? (I don't see that reference, maybe it's already embedded in your controls), but can't find any option to do so... Does anyone know a simple way to avoid that "requirement"?

Thanks in advance!

Gabriel
Ralitsa
Telerik team
 answered on 08 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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
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
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?