Telerik Forums
UI for WinForms Forum
1 answer
711 views

I have set the button's top border color to be red and bottom border color to be yellow by the below codes but the appearance never show the border colors when running.

            this.ButtonElement.BorderElement.BoxStyle = BorderBoxStyle.FourBorders;
            this.ButtonElement.BorderElement.TopColor = Color.Red;
            this.ButtonElement.BorderElement.TopWidth = 2;
            this.ButtonElement.BorderElement.BottomColor = Color.Yellow;
            this.ButtonElement.BorderElement.BottomWidth = 2;

Please help me to solve this problem.

Ralitsa
Telerik team
 answered on 03 Dec 2015
1 answer
206 views

Hi,

I am trying to add a tooltip to a RadDropDownListElement embedded in a Ribbonbar.

One may add tooltip text directly, to the ListElement or to the Textbox, but no one results in a tooltip being displayed.

I do not wish to add tooltip to individual items in the dropdownlist, but just one tooltip to the entire control.

Any advice?

/Brian

 

  

 

Hristo
Telerik team
 answered on 03 Dec 2015
1 answer
150 views

I am trying to create a GridViewCheckedDropDownListColumn. I have some of it working.

It is creating the column and the drop-down is displaying as it should. However, the main cell does not show the checked items after the drop-down is no longer displayed. Nor does it remember which items had previously been checked when the drop-down is displayed a second time.

 

I wasn't able to attach my project, so here is the important code:

public class Foo
{
    public int Id { get; set; }
 
    public string Value { get; set; }
 
    public bool IsSelected { get; set; }
}
public class Boo : Foo
{
    public List<Foo> Foos { get; set; }
 
    public Boo()
    {
        this.Foos = new List<Foo>();
    }
}

 

public class RadCheckedDropDownListEditorElement : RadCheckedDropDownListElement
{
    ...
}

public class RadCheckedDropDownListEditor : BaseGridEditor
{
    public string ValueMember { get; set; }
 
    public string DisplayMember { get; set; }
 
    public string CheckedMember { get; set; }
 
    public override object Value
    {
        get
        {
            var listEditorElement = (RadCheckedDropDownListElement) this.EditorElement;
            return listEditorElement.DataSource;
        }
        set
        {
            var listEditorElement = (RadCheckedDropDownListElement) this.EditorElement;
            listEditorElement.ValueMember = this.ValueMember;
            listEditorElement.DisplayMember = this.DisplayMember;
            listEditorElement.CheckedMember = this.CheckedMember;
            listEditorElement.DataSource = value;
        }
    }
     
    [AttributeProvider(typeof(IListSource))]
    [RadDescription("DataSource", typeof(RadListElement))]
    [Category("Data")]
    [RadDefaultValue("DataSource", typeof(RadListElement))]
    public object DataSource
    {
        get
        {
            var listEditorElement = (RadCheckedDropDownListElement)this.EditorElement;
            return listEditorElement.DataSource;
        }
        set
        {
            var listEditorElement = (RadCheckedDropDownListElement)this.EditorElement;
            listEditorElement.DataSource = value;
        }
    }
     
    protected override RadElement CreateEditorElement()
    {
        return new RadCheckedDropDownListEditorElement();
    }
}
public class GridViewCheckedDropDownListColumn : GridViewComboBoxColumn
{
    private RadCheckedDropDownListEditor _editor;
    private string _checkedMember;
 
    [Browsable(true)]
    [Editor("System.Windows.Forms.Design.DataMemberFieldEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(UITypeEditor))]
    [Category("Data")]
    [DefaultValue(null)]
    [Description("Gets or sets a string that specifies the property or database column from which to get values that correspond to the items in the RadDropDownListEditor.")]
    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]
    public string CheckedMember
    {
        get
        {
            return this._checkedMember;
        }
        set
        {
            if (this._checkedMember == value) return;
            this._checkedMember = value;
            this.DispatchEvent(KnownEvents.ColumnDataSourceInitializing, GridEventType.UI, GridEventDispatchMode.Send, (object)null, (object[])null);
        }
    }
     
    public GridViewCheckedDropDownListColumn()
    {
    }
 
    public GridViewCheckedDropDownListColumn(string fieldName) : base(fieldName)
    {
    }
 
    public GridViewCheckedDropDownListColumn(string uniqueName, string fieldName) : base(uniqueName, fieldName)
    {
    }
 
    public override Type GetDefaultEditorType()
    {
        return typeof(RadCheckedDropDownListEditor);
    }
 
    public override IInputEditor GetDefaultEditor()
    {
        return new RadCheckedDropDownListEditor();
    }
 
    public override void InitializeEditor(IInputEditor editor)
    {
        var dropDownListEditor = (RadCheckedDropDownListEditor) editor;
 
        if (dropDownListEditor == null) return;
 
        dropDownListEditor.ValueMember = this.ValueMember;
        dropDownListEditor.DisplayMember = this.DisplayMember;
        dropDownListEditor.CheckedMember = this.CheckedMember;
        dropDownListEditor.DataSource = this.DataSource;
    }
 
    public virtual void RadGridView_EditorRequired(object sender, EditorRequiredEventArgs e)
    {
        if (e.EditorType == typeof(RadCheckedDropDownListEditor))
        {
            e.Editor = this._editor ?? (this._editor = new RadCheckedDropDownListEditor());
        }
    }
}

 

public partial class Form1 : Form
{
    private List<Boo> _boos;
 
    public Form1()
    {
        this.InitializeComponent();
        this.InitializeList();
        this.InitializeColumns();
        this.radGridView.DataSource = this._boos;
    }
 
    private void InitializeList()
    {
        this._boos = new List<Boo>();
 
        for (int i = 0; i < 10; i++)
        {
            Boo b = new Boo
            {
                Id = i,
                Value = $"Boo-{i}"
            };
 
            for (int j = 0; j < 10; j++)
            {
                Foo f = new Foo
                {
                    Id = j,
                    Value = $"Foo-{i}.{j}"
                };
                b.Foos.Add(f);
            }
 
            this._boos.Add(b);
        }
    }
 
    private void InitializeColumns()
    {
        var c1 = new GridViewTextBoxColumn(nameof(Boo.Id));
        var c2 = new GridViewTextBoxColumn(nameof(Boo.Value));
        var c3 = new GridViewCheckedDropDownListColumn(nameof(Boo.Foos))
        {
            ValueMember = nameof(Foo.Id),
            DisplayMember = nameof(Foo.Value),
            CheckedMember = nameof(Foo.IsSelected),
            Width = 500
        };
 
        this.radGridView.Columns.Add(c1);
        this.radGridView.Columns.Add(c2);
        this.radGridView.Columns.Add(c3);
 
        this.radGridView.EditorRequired += c3.RadGridView_EditorRequired;
    }
}

Hristo
Telerik team
 answered on 03 Dec 2015
7 answers
1.6K+ views
Hi,

I am using a RadTreeView to display a set of nodes where the text is very long. Is it possible to specify a max width for the treeview node and have the text wrap within the available space extending down (or clipping beyond the horizontal size). 

(I have read some other posts on this but there is nothing in there for this year)

Regards
James   
Stefan
Telerik team
 answered on 02 Dec 2015
1 answer
209 views
Hi,

I need to do some action when the user clicks with the right button on the radgridview, but ignoring header clicks.

How can I identify header clicks?

 

PS: I'm using MouseClick event.

Thank you.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Dec 2015
2 answers
171 views

Hi guys,

I don't understand how can I obtain rows of particular page (current page also), then get single cell and update it.

I would click to next page for example, view rows of this page and update specific column of these rows.

 

How can I do it?

Dario
Top achievements
Rank 2
 answered on 02 Dec 2015
1 answer
146 views
I want to change the font of Custom Filter Dialog (CustomFilterDialogCaption, CustomFilterDialogLabel,....) in radgridview.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Dec 2015
3 answers
126 views

Hello I am examining PDFViwer PdfViewerNavigator controls. But in both of two, something is gone wrong.

Firstly, in RadPdfViewer cursor property only allows "WaitCursor". When I try to change as "Default", it is not allowed.

Secondly, in RadPdfViewerNavigator localization is not allowed. I override like this:

01.public class PdfViewerLocalization : PdfViewerLocalizationProvider
02.{
03.    public override string GetLocalizedString(string id)
04.    {
05.        switch (id)
06.        {
07.            case PdfViewerStringId.NavigatorOpenButton: return "Aç";
08.            case PdfViewerStringId.NavigatorPrintButton: return "Yazdır";
09.            case PdfViewerStringId.NavigatorPreviousPageButton: return "Önceki";
10.            case PdfViewerStringId.NavigatorNextPageButton: return "Sonraki";
11.            case PdfViewerStringId.NavigatorCurrentPageTextBox: return "Åžimdiki";
12.        }
13.            return base.GetLocalizedString(id);
14.    }

 15. }

But when I execute, It is same. English is not changing.

Could you help me for this situations?

Kind regards.

SarperSozen
Top achievements
Rank 1
 answered on 01 Dec 2015
2 answers
800 views
I am attempting to add an image to the gridview command column programmatically depending on certain conditions. I can add an image through the property builder for all the rows, but how do I do this with code?
Mark
Top achievements
Rank 1
 answered on 01 Dec 2015
1 answer
408 views

Hi,

Is it possible to add a floating window to RadDock without docking the form as first step. I am using the following code:

      Dim h As HostWindow = RadDock.DockControl(New MyForm(), DockPosition.Fill, DockType.Document)

      h.DefaultFloatingSize = New Size(800, 600)
      h.DockState = DockState.Floating

      h.Select()

The problem is, that this causes a lot of flickering and rearranging of the existing docked windows.

When added with Dockposition.Fill the new window will get focus. When floated the window in focus when the operation started may be hidden behind another window. Selecting the original window causes flickering between windows.

/Brian 

 

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 01 Dec 2015
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
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?