Telerik Forums
UI for WinForms Forum
3 answers
135 views

Is it possible to have a Toolbox in a RadDock tool window, and (obviously) be useable with a RadDiagram? How would I do this? I tried several things with limited results.

Thanks.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2017
4 answers
952 views

Hi.

I'm using 2017 R2. 

want to open new form, when cell double click. but I need to cell NOT on read only.

In other word, I'm need a RadGridView, with a cell edit mode, and double click event to open a new form.

im using snipped code, but this code have a problem, when user click on cell, event counter +1 , and after 2 or 3 One click on cell, and after double click on a cell, event void HostedControl_DoubleClick run for event count. 

 

01.private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
02.        {
03.            RadTextBoxEditor editor = e.ActiveEditor as RadTextBoxEditor;
04.            RadTextBoxEditorElement element = editor.EditorElement as RadTextBoxEditorElement;
05.            if (e.ColumnIndex == 0 || e.ColumnIndex == 1)
06.            {
07.                if (editor != null)
08.                {
09.                    element.TextBoxItem.HostedControl.DoubleClick += new EventHandler(HostedControl_DoubleClick);
10.                }
11.            }
12.        }
13. 
14.        void HostedControl_DoubleClick(object sender, EventArgs e)
15.        {
16.            if (new FrmGheteDir().ShowDialog() == DialogResult.OK)
17.            {
18.                _gheteId = FrmGheteDir.Gheteid;
19.                var ghete = (from u in _db.GheteStore where u.GheteId == _gheteId select u).First();
20.                radGridView1.CurrentRow.Cells[0].Value = ghete.GheteId;
21.                radGridView1.CurrentRow.Cells[1].Value = ghete.GheteList.Name;
22.                radGridView1.CurrentRow.Cells[3].Value = ghete.LastPriceIn;
23.             
24.            }
25.        }
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2017
3 answers
134 views

Maybe I missed the docs for this, but how do we serialize a diagram? Thanks.

Serialization - RadDiagram supports serializing and deserializing diagramming objects into and from XML documents.

Dimitar
Telerik team
 answered on 13 Sep 2017
1 answer
85 views

hello. i am trying to learn export to excel from RadGridView.i am using codes from demo app.

i want to set page orientation.and if possible use HeaderFooterSettings too.

I have been searched and read many topics about that but still cant figure out how to use "Telerik.Windows.Documents.Model.PageOrientation.Landscape;" codes

i need an example for understand this.

also i did read Worksheet PageSetup documention page too.But still need to see that codes on an example.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 Sep 2017
6 answers
303 views

I am binding a radgridview to a datatable the datatable contains a field ‘TankLevel’ that can have one of  5 values ‘1/4’, ‘half’, ¾’ , ‘Full’ or ‘Unknown’ I want to display this column as a GridViewComboBoxColumn and display the value from the underlying datatable and have  each of the 5 values available in the comboboxcolumn dropdown. When I bind to the datatable the combobox is populated with the data but combobox in each row has every row available in the dropdown! How can I make each row show the underlying record but irestrict the dropdown to the 5 values n order that the user can select from the other 4 values.

 

Dim cboCol As GridViewComboBoxColumn = New GridViewComboBoxColumn

                cboCol.Name = "cboCol"

                cboCol.HeaderText = "Fill Level"

                cboCol.DataSource = sVehDT

                cboCol.ValueMember = "TankLevel"

                cboCol.DisplayMember = "TankLevel"

                cboCol.FieldName = "TankLevel"

                Me.RadGridView1.Columns.Add(cboCol)

Dimitar
Telerik team
 answered on 13 Sep 2017
2 answers
141 views

I have a RadMaskedEdit box for phone number entry.

...
    Telerik.WinControls.UI.RadMaskedEditBox editPhone = new Telerik.WinControls.UI.RadMaskedEditBox();
...
    editPhone.Mask = "(000)000-0000";
    editPhone.MaskType = Telerik.WinControls.UI.MaskType.Standard;
    editPhone.Name = "editPhone";
    editPhone.Text = "(___)___-____";
    editPhone.TextMaskFormat = System.Windows.Forms.MaskFormat.IncludeLiterals;

 

I have defined a Customer class (simplified for this example)

public class Customer {
  public string CustomerName { get; set; }
  public string PhoneNumber { get; set; }
}

 

I bind the RadMaskedEditBox Value property to the PhoneNumber property of a Customer object.

  Customer editCustomer = new Customer();
...
  editPhone.DataBindings.Clear();
  editPhone.DataBindings.Add("Value", editCustomer, "PhoneNumber", false, DataSourceUpdateMode.OnPropertyChanged | DataSourceUpdateMode.OnValidation);

 

After this, when editing the phone number, using the "Del" or "Backspace" key will properly remove the character, but will move the caret to the first position of the text box.

If I remove the Data Binding, the "Del" and "Backspace" keys work as expected.  I don't have any event handling code for this control.  Currently we are using version 2016.3.913.40.

Is there a workaround, fix, or other change I can implement that will avoid the behavior as I've described?

 

Larry
Top achievements
Rank 1
 answered on 12 Sep 2017
2 answers
645 views

Hello,

I'm using Telerik version 2017 R2 for Winform app.

I have a gridview with "EnableHeaderCheckBox" option is "True".

When I group the gridview by a column A, then click on the checkbox on gridview header row (I meant "Select All" checkbox), please see the picture 1 below

[Picture 1] Click on Select All checkbox

[Picture 2] The result of click on Select All checkbox

As you can see in the result (Picture 2), the checkboxes of group header row is not checked automatically. When I click on the Select All checkbox, it just affects to the children checkboxes in each groups, not the checkboxes on group header row.

How can I check all the checkboxes on group header row when I click on the Select All checkbox?

Please give me an advice! Thanks so much!

Thanh
Top achievements
Rank 1
 answered on 12 Sep 2017
1 answer
112 views
So, I created my own Context menu, which works fine, Now i want to call the "AppointmentEditDialog" from it and still have it pass the selected appointment info to edit.  
Dimitar
Telerik team
 answered on 12 Sep 2017
4 answers
243 views

Hello, if execute the attached code, the ContextMenuOpening event is not raised with ContextMenuStrip

how can I edit the contextmenu depending on the node? Can't use ContextMenu nor RadContextMenu for the purpose.

Maybe can I capture the mouse position before the contextmenu gets opened and find the tree node in some ways?

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
    public class Form1 : Form
    {
        private IContainer components;
        private ContextMenuStrip contextMenuStrip1;
        private ToolStripMenuItem aToolStripMenuItem;
        private Telerik.WinControls.UI.RadTreeView radTreeView1;
 
        public Form1()
        {
            this.components = new System.ComponentModel.Container();
            this.radTreeView1 = new Telerik.WinControls.UI.RadTreeView();
            this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.aToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
 
            ((System.ComponentModel.ISupportInitialize) (this.radTreeView1)).BeginInit();
            this.contextMenuStrip1.SuspendLayout();
            this.SuspendLayout();
            
            this.radTreeView1.Location = new System.Drawing.Point(16, 12);
            this.radTreeView1.Size = new System.Drawing.Size(251, 152);
            this.radTreeView1.ContextMenuOpening += new Telerik.WinControls.UI.TreeViewContextMenuOpeningEventHandler(this.radTreeView1_ContextMenuOpening);
             
            this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.aToolStripMenuItem});
            this.contextMenuStrip1.Name = "contextMenuStrip1";
             
            this.aToolStripMenuItem.Name = "aToolStripMenuItem";
            this.aToolStripMenuItem.Text = "A";
            this.aToolStripMenuItem.Click += new System.EventHandler(this.aToolStripMenuItem_Click);
            //
            // Form1
            //
            this.ClientSize = new System.Drawing.Size(284, 261);
            this.Controls.Add(this.radTreeView1);
            ((System.ComponentModel.ISupportInitialize) (this.radTreeView1)).EndInit();
            this.contextMenuStrip1.ResumeLayout(false);
            this.ResumeLayout(false);
 
            radTreeView1.ContextMenuStrip = this.contextMenuStrip1;
        }
 
 
        string context = "radTreeView1_ContextMenuOpening WAS NOT executed";
        private void radTreeView1_ContextMenuOpening(object sender, Telerik.WinControls.UI.TreeViewContextMenuOpeningEventArgs e)
        {
            context = "radTreeView1_ContextMenuOpening WAS executed";
        }
         
        private void aToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessageBox.Show(this, context);
        }
    }
}
Christ
Top achievements
Rank 2
 answered on 11 Sep 2017
3 answers
149 views

Hi,

if you change the 

GraphicalViewElement.TimelineStart

of the GanttView to a date inside the range of nodes, to just print a part of the Gannt, the graphical representation overlaps the table. 

The expected result should be that the printed timeline gets cut at the TimelineStart, like it correctly does at TimelineEnd.

gipsy
Top achievements
Rank 1
 answered on 11 Sep 2017
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
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
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?