Telerik Forums
UI for WinForms Forum
4 answers
909 views
Hi.  I am using your Q3 2009 WIn controls and would like to know how do I trap the selected item change event in a multi column combo box column in the grid view.

Additionally, I am trying to format the Drop down (grid element) of the column in a subroutine. 
The grid itself is bound to a list and the  multi-column combo box column is bound to another list.  I am able to bound the dropdown list using;

Dim colLookup As GridViewMultiComboBoxColumn = TryCast(.Columns("SourceColumnIndex"), GridViewMultiComboBoxColumn)

            If colLookup IsNot Nothing Then
                colLookup.DataSource = SourceColumPicLst
                colLookup.ValueMember = "ColumnIndex"
                colLookup.DisplayMember = "ColumnIndex"
            End If

That successfully binds and displays the list for the columns properly.
I would also like to format the dropdown displayed.  I've attempted to access the editor control using the GetDefaultEditor() function of the Column setting that to a grid view.   It however returns nothing.  What event could I use to get to the grid element of the dropdown that will allow me to format the display?

Thank you for the assist.

Dimitar
Telerik team
 answered on 06 Feb 2014
8 answers
214 views

After upgrading the controls from version 2012.3.1211.40 to the latest 2013.3.1127.40 I am seeing an issue only on one type of computer (Panasonic Toughbooks) where after you select an item from a RadDropDownList with a DropDownStyle set to DropDownList you will get a speech bubble with the value that you selected in it. If the RadDropDownList box’s style is set to DropDown, it does not exhibit the same issue and works as expected. I created a basic sample program using just the controls in the two styles with no additional code and I received the same results (see Dropdownlist attachment).  Copying over the Telerik Demo programs I get the same result.

I have tried my little program on several Panasonic computers with the same results but on other non-Panasonic  computers, they act normally.  Any Ideas as to what may be going on since the old version of the controls worked fine.

John

Dimitar
Telerik team
 answered on 06 Feb 2014
1 answer
75 views

I need to prevent the Grid from turning all gray when I disable it. how can i do that?


Thanks,

Kim
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Feb 2014
0 answers
104 views
hi /Telerik team

How visible columns(0) in GridView Multi ComboBox??


Mr
Top achievements
Rank 1
 asked on 05 Feb 2014
6 answers
309 views
Hi,
I was wondering if someone could help me, which event is best to call to save any changes made in the RadScheduler.At present I I use a button to save all changes using TableAdapters. I would like the changes saved automatically ie if resized, dragged or a appointment is opend edited and closed.

I've tried the .Appointments.CollectionChanged and when adding an event using CustomEditAppointmentDialog it adds the appointment twice.

Thanks

Ivan Todorov
Telerik team
 answered on 05 Feb 2014
3 answers
101 views
Hey,

We are kinda in problems with chartview's trackball issue. Every time we swap our serie's CombineMode and move mouse over chart, our program crashes. We are still running with Q3 -version (can't rush SP1 update as we have to pre-plan these ones). We have allready tested that in SP1 issue is fixed, as you have reported in release notes.

Do you happen to have any workaround for Q3's trackball issue, so that we could keep running with current version for couple more months?


Best Regards,
Toni Hämeenniemi
George
Telerik team
 answered on 04 Feb 2014
4 answers
576 views
 Hi,

I would like to get the attention of the user by making the rad button blink and change the back color to red. How can this be done? Please advise.

Thanks
RJ
Stefan
Telerik team
 answered on 04 Feb 2014
6 answers
302 views
I'm trying to follow Telerik's c# documentation to create column groups with multiple headers:

private

 

 

void InitializeGrid()

 

 

{

 

 

 

 

 

ColumnGroupsViewDefinition view = new ColumnGroupsViewDefinition();

 

 

view.ColumnGroups.Add(

 

new GridViewColumnGroup("Customer Contact"));

 

 

view.ColumnGroups.Add(

 

new GridViewColumnGroup("Details"));

 

 

view.ColumnGroups[1].Groups.Add(

 

new GridViewColumnGroup("Address"));

 

 

view.ColumnGroups[1].Groups.Add(

 

new GridViewColumnGroup("Contact"));

 

 

view.ColumnGroups[0].Rows.Add(

 

new GridViewColumnGroupRow());

 

 

view.ColumnGroups[0].Rows[0].Columns.Add(

 

this.radGridView1.Columns["CompanyName"]);

 

 

view.ColumnGroups[0].Rows[0].Columns.Add(

 

this.radGridView1.Columns["ContactName"]);

 

 

view.ColumnGroups[0].Rows[0].Columns.Add(

 

this.radGridView1.Columns["ContactTitle"]);

 

 

view.ColumnGroups[1].Groups[0].Rows.Add(

 

new GridViewColumnGroupRow());

 

 

view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(

 

this.radGridView1.Columns["Address"]);

 

 

view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(

 

this.radGridView1.Columns["City"]);

 

 

view.ColumnGroups[1].Groups[0].Rows[0].Columns.Add(

 

this.radGridView1.Columns["Country"]);

 

 

view.ColumnGroups[1].Groups[1].Rows.Add(

 

new GridViewColumnGroupRow());

 

 

view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(

 

this.radGridView1.Columns["Phone"]);

 

 

view.ColumnGroups[1].Groups[1].Rows[0].Columns.Add(

 

this.radGridView1.Columns["Fax"]);

 

 

radGridView1.ViewDefinition = view;

 

}

The last line produces the error object reference not set to an instance of an object. Do you know what I'm doing wrong?

Thanks.

George
Telerik team
 answered on 04 Feb 2014
2 answers
69 views
Can I add a RadSpinEditor in the RadRibbonBar ? If possible, how ?

Thanks

Paulo
Paulo Goncalves
Top achievements
Rank 2
 answered on 03 Feb 2014
5 answers
403 views
Hello,

when I enter a value and it matches only one entry in the autocomplete dropdown list the dropdownbox will be closed, but the SelecedIndexChanged event of the DropDownList control will not fired.
Only when I select a entry in the dropdown box the event will be fired.

For example I enter "Germany", one item matches and the dropdownbox closing. The SelectedIndexChanged event will not fired. It will be fired after leaving the control by tab key or click another control like a button.
When I enter "Germ" two items matches. When I select one the dropdown closing and the SelectedIndexChanged event will be fired.

Why the SelectedIndexChanged event will not fired? It have to fire or not? How to solve?

Here is my code:
public partial class EulaViewerView : UserControl
{
    #region private Members
 
    /// <summary>
    /// The BackgroundWorker that is used to load the country list asynchronous.
    /// </summary>
    private BackgroundWorker _asyncWorker;
 
    #endregion
 
    #region Constructor
 
    /// <summary>
    /// The constructor of the class.
    /// </summary>
    public EulaViewerView()
    {
        InitializeComponent();
        this.Localize();
        CountrySelector.DropDownListElement.AutoCompleteSuggest.DropDownList.VisualItemFormatting += DropDownList_VisualItemFormatting;
        this.InitializeControl();
    }
 
    #endregion
 
    #region BackgroundWorker methods
 
    /// <summary>
    /// BackgroundWorker finished event handling.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void asyncWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
        this.Cursor = Cursors.Hand;
    }
 
    /// <summary>
    /// Adding in background created DropDownList items to the DropDonwList.
    /// </summary>
    /// <param name="sender">The instance of the BackgroundWorker.</param>
    /// <param name="e">The BackgroundWorker event arguments.</param>
    private void asyncWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
    {
        if (e.UserState is RadListDataItem)
            this.CountrySelector.Items.Add(e.UserState as RadListDataItem);
    }
 
    /// <summary>
    /// Loads the country list and create DropDownList items
    /// </summary>
    /// <param name="sender">The instance of the BackgroundWorker.</param>
    /// <param name="e">The BackgroundWorker event arguments.</param>
    private void asyncWorker_DoWork(object sender, DoWorkEventArgs e)
    {
        CountryList countyList = new CountryList();
        BackgroundWorker worker = sender as BackgroundWorker;
 
        foreach (Country country in countyList.Countries)
        {
            if (country.CountryName != "")
            {
                string imagekey = this.GetImageKey(country);
                if (!string.IsNullOrEmpty(imagekey))
                {
                    RadListDataItem item = new RadListDataItem(country.CountryName);
                    item.Image = this.imageList1.Images[this.GetImageKey(country)];
                    item.Value = country;
                    item.ForeColor = Color.Black;
                    if (EulaInfo.Instance.CountrySelected && country.CountryName == EulaInfo.Instance.SelectedCountry.CountryName)
                        item.Selected = true;
                    worker.ReportProgress(1, item);
                }
            }
        }
    }
 
    #endregion
 
    #region helper methods
 
    /// <summary>
    /// Formatting event handling for DropDownListItems to add country flag in autocomplete list.
    /// </summary>
    /// <param name="sender">The sender.</param>
    /// <param name="args">The arguments.</param>
    private void DropDownList_VisualItemFormatting(object sender, VisualItemFormattingEventArgs args)
    {
        args.VisualItem.Image = this.imageList1.Images[this.GetImageKey((Country)args.VisualItem.Data.Value)];
    }
 
    /// <summary>
    /// Inits the control components and starts loading the countries in background.
    /// </summary>
    private void InitializeControl()
    {
        this.Cursor = Cursors.WaitCursor;
        this.CountrySelector.DropDownListElement.AutoCompleteSuggest.SuggestMode = SuggestMode.Contains;
        this.CountrySelector.DropDownListElement.TextBox.StretchVertically = true;
        _asyncWorker = new BackgroundWorker();
        _asyncWorker.DoWork += asyncWorker_DoWork;
        _asyncWorker.ProgressChanged += asyncWorker_ProgressChanged;
        _asyncWorker.RunWorkerCompleted += asyncWorker_RunWorkerCompleted;
        _asyncWorker.WorkerReportsProgress = true;
        _asyncWorker.RunWorkerAsync();
    }
 
    /// <summary>
    /// Gets the image key for the given country in imageList1.
    /// </summary>
    /// <param name="country"></param>
    /// <returns></returns>
    private string GetImageKey(Country country)
    {
        string retval = string.Empty;
 
        if (!string.IsNullOrEmpty(country.EnglishName))
            retval = "flag_" + country.EnglishName + ".png";
 
        return retval;
    }
 
    #endregion
 
    #region Control event handling methods
 
    /// <summary>
    /// Syncronize relevant control states to EulaInfo instance.
    /// </summary>
    /// <param name="sender">The control instance.</param>
    /// <param name="e">The event arguments.</param>
    private void AgreeEulaActor_CheckedChanged(object sender, EventArgs e)
    {
        EulaInfo.Instance.Accepted = this.AgreeEulaActor.Checked;
    }
 
    /// <summary>
    /// Syncronize relevant control states to EulaInfo instance.
    /// </summary>
    /// <param name="sender">The control instance.</param>
    /// <param name="e">The event arguments.</param>
    private void DisagreeEulaActor_CheckedChanged(object sender, EventArgs e)
    {
        EulaInfo.Instance.Accepted = this.AgreeEulaActor.Checked;
    }
 
    /// <summary>
    /// Print out the actually shown eula.
    /// </summary>
    /// <param name="sender">The control instance.</param>
    /// <param name="e">The event arguments.</param>
    private void btnPrintActor_Click(object sender, EventArgs e)
    {
        this.EulaReader.Print();
    }
 
    /// <summary>
    /// Change DropDownList style and loads the embedded eula document for the selected country into the PDF reader control.
    /// </summary>
    /// <param name="sender">The DropDownList instance.</param>
    /// <param name="e">The event arguments.</param>
    private void CountrySelector_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e)
    {
        this.Cursor = Cursors.WaitCursor;
 
        EulaInfo.Instance.SelectedCountry = this.CountrySelector.SelectedValue as Country;
        this.CountrySelector.DropDownListElement.ShowImageInEditorArea = true;
        this.CountrySelector.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
         
        try
        {
            Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("SharePointProductInstaller.Eula." + EulaInfo.Instance.SelectedCountry.EulaID);
            this.EulaReader.LoadDocument(stream);
            this.AgreeEulaActor.Checked = EulaInfo.Instance.Accepted;
            this.DisagreeEulaActor.Checked = !EulaInfo.Instance.Accepted;
            this.btnPrintActor.Enabled = true;
            this.AgreeEulaActor.Enabled = true;
            this.DisagreeEulaActor.Enabled = true;
        }
        catch (Exception ex)
        {
            //throw ex;
        }
        finally
        {
            this.Cursor = Cursors.Default;
        }
    }
 
    /// <summary>
    /// Changes the DropDonwList style for text input (autocomplete mode).
    /// </summary>
    /// <param name="sender">The DropDownList instance.</param>
    /// <param name="e">The event arguments.</param>
    private void CountrySelector_MouseClick(object sender, MouseEventArgs e)
    {
        this.CountrySelector.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDown;
        this.CountrySelector.DropDownListElement.ShowImageInEditorArea = false;
    }
 
    /// <summary>
    /// Checks and update DropDownList selected item when leaving.
    /// This is needed if control lost focus and no item was selected after entering text.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void CountrySelector_Leave(object sender, EventArgs e)
    {
        if (this.CountrySelector.SelectedValue != null && this.CountrySelector.Text != ((Country)this.CountrySelector.SelectedValue).CountryName)
        {
            var matchedItem = this.CountrySelector.Items.First(x => x.Text == this.CountrySelector.Text);
            if (matchedItem != null)
                matchedItem.Selected = true;
            else
            {
                this.CountrySelector.Text = "";
                this.CountrySelector.SelectedItem = null;
            }
        }
    }
 
    private void Localize()
    {
        this.lCountryInfoHeadline.Text = Properties.Resources.EulaStepTitle;
        this.CountrySelector.NullText = Properties.Resources.CountrySelectorNullText;
        this.DisagreeEulaActor.Text = Properties.Resources.DisagreeEulaActorText;
        this.AgreeEulaActor.Text = Properties.Resources.AgreeEulaActorText;
        this.btnPrintActor.Text = Properties.Resources.btnPrintActorText;
    }
 
    #endregion
}

Regards,
Ralf
George
Telerik team
 answered on 03 Feb 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?