Telerik Forums
UI for WinForms Forum
1 answer
68 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
96 views
hi /Telerik team

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


Mr
Top achievements
Rank 1
 asked on 05 Feb 2014
6 answers
292 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
88 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
562 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
296 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
65 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
383 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
5 answers
211 views
Hi,

I have a problem with GridView and Filtering. There is a submenu showing all available filters such as ("Contains", "Does not contain", "Starts with", etc.). Now I want to hide some of those entries for specific columns. I haven't found any examples solving my problem. Could anyone give me a hint or provide me some short example solving my problem?

Thx
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Feb 2014
3 answers
479 views
Hi;

I am trying to delete the selected day in the calendar. Is it possible not to have any day selected? The Clear button select Today. I tried to use a Context Menu with a event having this code:

                this.rCalendario.SelectedDates.Clear();

                this.rCalendario.SelectedDate = new DateTime();

And again select a day.

Can you help me?

Thanks
Stefan
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)
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?