Telerik Forums
UI for WinForms Forum
3 answers
254 views
The MultiColumnComboBox currently selects the correct value in the popup when using the ENTER key. I want to achieve the same behavior with the TAB key but I haven't succeeded.

Also, if the user's text is not associated to any of the items, I want to empty the textbox so that he sees that's not a valid option.

Thanks!

Sample code :

using System.Collections.Generic;
using System.Windows.Forms;
using Telerik.WinControls;
using Telerik.WinControls.Data;
using Telerik.WinControls.UI;
 
namespace MultiColumnComboAutoSelectWithTab
{
    public class RandomObject
    {
        public int Id { get; set; }
        public string FirstStuff { get; set; }
        public string SecondStuff { get; set; }
 
        public RandomObject(int id, string first, string second)
        {
            this.Id = id;
            this.FirstStuff = first;
            this.SecondStuff = second;
        }
 
    }
    public class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
 
            InitializeCustomComponent();
 
            var lst = new List<RandomObject>();
            lst.Add(new RandomObject(1, "Albert", "Stuff"));
            lst.Add(new RandomObject(2, "Alphonse", "Stuff"));
 
            this.radMultiColumnComboBox1.DataSource = lst;
        }
 
        private void InitializeCustomComponent()
        {
            this.radMultiColumnComboBox1.DisplayMember = "FirstStuff";
            this.radMultiColumnComboBox1.ValueMember = "Id";
 
            this.radMultiColumnComboBox1.EditorControl.Columns.Add(new GridViewTextBoxColumn("Id", "Id"));
            this.radMultiColumnComboBox1.EditorControl.Columns["Id"].IsVisible = false;
            this.radMultiColumnComboBox1.EditorControl.Columns.Add(new GridViewTextBoxColumn("FirstStuff", "FirstStuff"));
            this.radMultiColumnComboBox1.EditorControl.Columns["FirstStuff"].HeaderText = "First stuff";
            this.radMultiColumnComboBox1.EditorControl.Columns.Add(new GridViewTextBoxColumn("SecondStuff", "SecondStuff"));
            this.radMultiColumnComboBox1.EditorControl.Columns["SecondStuff"].HeaderText = "SecondStuff";
 
            this.radMultiColumnComboBox1.AutoFilter = true;
            this.radMultiColumnComboBox1.DropDownStyle = RadDropDownStyle.DropDown;
            this.radMultiColumnComboBox1.AutoSize = true;
            this.radMultiColumnComboBox1.AutoSizeDropDownToBestFit = true;
 
            var filter = new FilterDescriptor(this.radMultiColumnComboBox1.DisplayMember, FilterOperator.StartsWith, string.Empty);
            this.radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter);
        }
 
        /// <summary>
        /// Variable nécessaire au concepteur.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Nettoyage des ressources utilisées.
        /// </summary>
        /// <param name="disposing">true si les ressources managées doivent être supprimées ; sinon, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region AutoGeneratedStuff
 
        private void InitializeComponent()
        {
            this.radMultiColumnComboBox1 = new Telerik.WinControls.UI.RadMultiColumnComboBox();
            this.radTextBox1 = new Telerik.WinControls.UI.RadTextBox();
            ((System.ComponentModel.ISupportInitialize)(this.radMultiColumnComboBox1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).BeginInit();
            this.SuspendLayout();
            //
            // radMultiColumnComboBox1
            //
            //
            // radMultiColumnComboBox1.NestedRadGridView
            //
            this.radMultiColumnComboBox1.EditorControl.BackColor = System.Drawing.SystemColors.Window;
            this.radMultiColumnComboBox1.EditorControl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radMultiColumnComboBox1.EditorControl.ForeColor = System.Drawing.SystemColors.ControlText;
            this.radMultiColumnComboBox1.EditorControl.Location = new System.Drawing.Point(0, 0);
            //
            //
            //
            this.radMultiColumnComboBox1.EditorControl.MasterTemplate.AllowAddNewRow = false;
            this.radMultiColumnComboBox1.EditorControl.MasterTemplate.AllowCellContextMenu = false;
            this.radMultiColumnComboBox1.EditorControl.MasterTemplate.AllowColumnChooser = false;
            this.radMultiColumnComboBox1.EditorControl.MasterTemplate.EnableGrouping = false;
            this.radMultiColumnComboBox1.EditorControl.MasterTemplate.ShowFilteringRow = false;
            this.radMultiColumnComboBox1.EditorControl.Name = "NestedRadGridView";
            this.radMultiColumnComboBox1.EditorControl.ReadOnly = true;
            this.radMultiColumnComboBox1.EditorControl.ShowGroupPanel = false;
            this.radMultiColumnComboBox1.EditorControl.Size = new System.Drawing.Size(240, 150);
            this.radMultiColumnComboBox1.EditorControl.TabIndex = 0;
            this.radMultiColumnComboBox1.Location = new System.Drawing.Point(81, 78);
            this.radMultiColumnComboBox1.Name = "radMultiColumnComboBox1";
            //
            //
            //
            this.radMultiColumnComboBox1.RootElement.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.WrapAroundChildren;
            this.radMultiColumnComboBox1.Size = new System.Drawing.Size(369, 20);
            this.radMultiColumnComboBox1.TabIndex = 0;
            this.radMultiColumnComboBox1.TabStop = false;
            this.radMultiColumnComboBox1.Text = "radMultiColumnComboBox1";
            //
            // radTextBox1
            //
            this.radTextBox1.Location = new System.Drawing.Point(81, 131);
            this.radTextBox1.Name = "radTextBox1";
            this.radTextBox1.Size = new System.Drawing.Size(330, 20);
            this.radTextBox1.TabIndex = 1;
            this.radTextBox1.TabStop = false;
            this.radTextBox1.Text = "radTextBox1";
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(498, 266);
            this.Controls.Add(this.radTextBox1);
            this.Controls.Add(this.radMultiColumnComboBox1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.radMultiColumnComboBox1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radTextBox1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
 
        }
 
        #endregion
 
        private Telerik.WinControls.UI.RadMultiColumnComboBox radMultiColumnComboBox1;
        private Telerik.WinControls.UI.RadTextBox radTextBox1;
    }
}
Francois
Top achievements
Rank 1
 answered on 18 Oct 2011
11 answers
874 views
hi,

I have Implemented Export to Excel for A RadGridView Content. It is working.
But the problem here is, I have child templetes also in my application.

Can you please tell me how to export The RadGridView content including Child templates
Or is there any property to be assigned.

Thank you.

regards,
Mahitha Madala.
Martin Vasilev
Telerik team
 answered on 17 Oct 2011
7 answers
290 views
Hi there,

I'd really like to make use of the GridViewMultiComboBoxColumn but I'm finding a few problems.

I have the DataSource property of the column bound to a collection of business objects.  That object has all sorts of properties and I really only want to show 2 of them.

I don't see any examples of the GridViewMultiComboBoxColumn in the shipping source code (Q3 2009 SP1) however I did find a couple of posts (here and here) of others trying to do something similar and it appears I need to customize the displayed Grid in the CellBeginEdit event.

A funny implementation detail of this is that since that event gets called everytime the user clicks on a row, I now need to add some class variable to determine if I've customized the grid otherwise the columns I add programmatically get added over and over...  overlooking that for the moment here's my questions.

Question 1:  My first issue is that when I click on the cell with the GridViewMultiComboBoxColumn, it suddenly shows me a Type name 'Telerik.WinControls.UI.GridViewDataRowInfo' instead of the DisplayMember.  Here's a screenshot.

Question 1.1: As a side note, why must a click twice in the cell to get the drop down to display?

Question 2:  My second issue is that when it displays the Grid, even though I've told it to only display 2 columns, it still makes space for all the properties.  Why is this?  It doesn't seem to matter if I call BestFitColumns().  Here's a screenshot.

I've uploaded my source code here for you to see.
Francois
Top achievements
Rank 1
 answered on 17 Oct 2011
2 answers
172 views
Hi Telerik

I'm trying to create a standout highlight in a treeview to indicate which document in a raddock has been selected. I have created a Custom document with a DocumentNode property which points to the node in the tree which relates to the document. I'm using the Active document changed event and a TreeViewElement.Update to attempt this. THe code works for the addition of a single document but gets stuck on the next added document and won't reformat the appropriate node when I change from one document to the other by clicking on the document window tab.

The key code snippets are below:
In Active Document changed

tvMPWorkspace.TreeViewElement.Update(RadTreeViewElement.UpdateActions.StateChanged);


In Node Formatting event

if (rDockModelPackage.DocumentManager.ActiveDocument != null && ((RadCustomDocumentWindow)rDockModelPackage.DocumentManager.ActiveDocument).DocumentNode == e.Node)
{
    e.NodeElement.BackColor = Color.PaleGoldenrod;
}
else
{
    e.NodeElement.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local);
}

As usual, all help gratefully received
Regards
Ian
Ian
Top achievements
Rank 1
 answered on 17 Oct 2011
2 answers
173 views
Hi
When i am droping an object from another control to ribbon, how do u know.. where did i drop my object, i mean.. on which button/gallery and what is that name and all


i have tried like this
Point pt = new Point(e.X, e.Y);
 if ((rbMosaique.GetChildAtPoint(pt) != null) &&
(rbM.GetChildAtPoint(pt).GetType() == typeof(Telerik.WinControls.UI.RadGalleryItem))


but it is always showing null


pelase help me 


Advance thanks


Regards
Hema
Peter
Telerik team
 answered on 17 Oct 2011
9 answers
294 views
Is there something broken about dragdrop in Q2 treeview?
I have a treeview where I have enabled 'AllowDragDrop' and 'AllowDrop'. However, the 'ItemDrag', 'DragStarted' and 'DragStarting' events aren't firing all all.

Is there something I'm doing wrong? The documentation makes it look easy!
I'm basically wanting to detect when a node from the first treeview is dragged into the second treeview.

Thanks,
Richard.
Svett
Telerik team
 answered on 17 Oct 2011
1 answer
286 views
Hi,

I am using RadListView in DetailView type and have 4 columns.  I would like to display an image before the text in the 3rd column depending on the data in that column.  The column holds a file name i.e myFile.pdf and I would like to make that a link that is clickable how do I do that?

I know this is twp questions into one but I really need a quick response and the Issue tracker site is not working at the moment

Thanks
H
Ivan Todorov
Telerik team
 answered on 17 Oct 2011
8 answers
228 views
Hello,
I want "four column headings" Merge to "1" header line.
is that possible?
Ivan Petrov
Telerik team
 answered on 17 Oct 2011
2 answers
324 views
I want to have a button in the filter row for cancelling all active filters.
Just like the Clear filters button in http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filtertemplate/defaultcs.aspx

Is this possible in winforms?
Dave
Top achievements
Rank 1
 answered on 15 Oct 2011
6 answers
338 views
Is there a way to increase the status indicator width for appointments?
Ivan Todorov
Telerik team
 answered on 14 Oct 2011
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?