Telerik Forums
UI for WinForms Forum
4 answers
122 views

Hi ,

I create custom cell in gridview . My code :

 public class RadioButtonCellElement : GridDataCellElement
    {
        private RadRadioButtonElement radioButtonElement1;
        private RadRadioButtonElement radioButtonElement2;
        private RadRadioButtonElement radioButtonElement3;
        private RadTextBoxEditorElement customText;
        public RadioButtonCellElement(GridViewColumn column, GridRowElement row)
        : base(column, row)
        {
        }
        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            radioButtonElement1 = new RadRadioButtonElement();
            radioButtonElement1.Margin = new Padding(0, 2, 0, 0);
            radioButtonElement1.MinSize = new Size(50, 20);
            radioButtonElement1.Text = "0.1";

            radioButtonElement2 = new RadRadioButtonElement();
            radioButtonElement2.Margin = new Padding(0, 2, 0, 0);
            radioButtonElement2.MinSize = new Size(50, 20);
            radioButtonElement2.Text = "0.2";

            radioButtonElement3 = new RadRadioButtonElement();
            radioButtonElement3.Margin = new Padding(0, 2, 0, 0);
            radioButtonElement3.MinSize = new Size(80, 20);
            radioButtonElement3.Text = "Custom";

            customText = new RadTextBoxEditorElement();
            //customText.Enabled = false;
            customText.Size = new Size(10, 20);

            this.Children.Add(radioButtonElement1);
            this.Children.Add(radioButtonElement2);
            this.Children.Add(radioButtonElement3);
            this.Children.Add(customText);

            radioButtonElement1.MouseDown += new MouseEventHandler(radioButtonElement1_MouseDown);
            radioButtonElement2.MouseDown += new MouseEventHandler(radioButtonElement2_MouseDown);
            radioButtonElement3.MouseDown += new MouseEventHandler(radioButtonElement3_MouseDown);
        }

    protected override void DisposeManagedResources()
        {
            radioButtonElement1.MouseDown -= new MouseEventHandler(radioButtonElement1_MouseDown);
            radioButtonElement2.MouseDown -= new MouseEventHandler(radioButtonElement2_MouseDown);
            radioButtonElement3.MouseDown -= new MouseEventHandler(radioButtonElement3_MouseDown);
            base.DisposeManagedResources();
        }

        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            if (this.Children.Count == 4)
            {
                this.Children[0].Arrange(new RectangleF(0, 0, 50, 20));
                this.Children[1].Arrange(new RectangleF(55, 0, 50, 20));
                this.Children[2].Arrange(new RectangleF(110, 0, 20, 20));
                this.Children[3].Arrange(new RectangleF(180, 0, 50, finalSize.Height));
                this.Children[3].Alignment = ContentAlignment.MiddleCenter;
            }

            return finalSize;
        }

      public override void Initialize(GridViewColumn column, GridRowElement row)
        {
            base.Initialize(column, row);

            ((RadioPrimitive)radioButtonElement1.Children[1].Children[1].Children[0]).BackColor2 = Color.Red;
            ((RadioPrimitive)radioButtonElement2.Children[1].Children[1].Children[0]).BackColor2 = Color.Blue;
            ((RadioPrimitive)radioButtonElement3.Children[1].Children[1].Children[0]).BackColor2 = Color.Green;
        }

}

 

 // Add Labor Time column
       RadioButtonColumn column = new RadioButtonColumn("LaborTime");
       column.HeaderText = "Labor Time";
       column.Width = 400;
       this.gvLaborGuide.Columns.Add(column);

It it working, but when i scroll , it has problem.

Please look at the link:

https://www.screencast.com/t/mVJdsfrk

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jul 2017
1 answer
200 views

I'd like to bind my RichTextEditor to a text property that contains HTML.  If I understand correctly, one needs to import the HTML into the RTE for it to show up as formatted text and then export it to turn it back into HTML.

I'm wondering whether anyone has used the Format() and Parse() methods of Winforms DataBiinding to accomplish this seamlessly?

Or is there perhaps a simpler way of binding to an HTML data source that's provided by this Control?

Thanks in advance.

 

Michael

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Jul 2017
1 answer
128 views

I have not found how to select the entire content of a DateTimePicker when it get's focus (OnEnter).  I have done this with a MaskedEditBox, but can't seem to get it to work with this control. Any help would be greatly appreciated.

 

Thanks

Dimitar
Telerik team
 answered on 20 Jul 2017
2 answers
172 views

I see you folks have the Office 2016 Theme in UI for WPF but what about UI for WinForms?  Is this in the works or being planned for or...?

Any information you can provide would be very much appreciated!

 

-Curtis

 

Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 19 Jul 2017
1 answer
183 views

Hi

How can i use a contexMenueStrip on a radGridView ?

I wanna cut a cell and paste it into another but I don't wanna use radGridView cutting property ...

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 19 Jul 2017
1 answer
179 views

Hello,

I have set up a RadDataEntry for inputting into a custom view model very similarly to the example given in the documentation found here:

http://docs.telerik.com/devtools/winforms/dataentry/validation

What I want to be able to do and have not been able to find a clear way of doing so is to check the validation state of the control. I want to check to make sure none of the fields are in an Invalid state (aka have an error) when the user clicks the Save button. If anything has an error, I want to be able to prevent the Save button from being enabled or saving the data until they fix the errors. Is there a built in way or a standard procedure for checking if any errors exist in the Data Entry control?

Thanks,

Hristo
Telerik team
 answered on 19 Jul 2017
2 answers
106 views

Hello,

I am having trouble with slow down when loading series with a large number of points (>10,000). I have seen in other posts that the suggested solution is to manually aggregate out the data. I just have couple of questions in reference to this.

1. Are there any other ways to increase performance? I have seen on posts in the WPF forum that there are graphics acceleration features available using Direct2D. Am I correct in understanding that these are not at all available in the Winforms version?

2. If aggregating the data is the only way to reduce the number of rendered points, is it possible to load in removed data points when using the zoom feature to zoom in on sections of the data?

Thank you for your help!

Dimitar
Telerik team
 answered on 17 Jul 2017
37 answers
2.0K+ views

I am needing that every document (text file) is converted to the same Font(Consolas) and Size(10).

 I have tried 

Public Sub SetDefaultFontPropertiesToEditor(ByVal editor As RadRichTextEditor)
 
editor.RichTextBoxElement.ChangeFontFamily(New Telerik.WinControls.RichTextEditor.UI.FontFamily("Consolas"))
 
editor.RichTextBoxElement.ChangeFontSize(Unit.PointToDip(10))
 
editor.DocumentInheritsDefaultStyleSettings = True
 
 End Sub

Which changes the Font and Size drop downs but not the document.

any thoughts


 
Harm
Top achievements
Rank 1
 answered on 17 Jul 2017
1 answer
398 views

Hi,

How do I set the visibility of the search row programatically please.? I know I can show it using ctrl F (Localization, does this change for chinese equivalent?) but we don't want to have users phoning us up for support if they click the close button and they don't know about the ctrl F option.

At the moment I'm calling the following to force it to appear from a context menu option.

dataGrid.AllowSearchRow = false;
dataGrid.AllowSearchRow = true;

From finding a thread on the forum I can read the visibility by calling

var searchCell = dataGrid.TableElement.GetCellElement(dataGrid.MasterView.TableSearchRow, null) as GridSearchCellElement;
if (searchCell != null) return searchCell.Visibility != ElementVisibility.Hidden;

But if I set searchCell.Visibility then I'm still seeing the row that would hold the search controls, but the controls themselves are hidden.

thanks :)

 

Dimitar
Telerik team
 answered on 17 Jul 2017
2 answers
138 views

Hi,

I am following this example : http://www.telerik.com/support/kb/winforms/details/creating-a-radradiobuttoncellelement

It is working now, but i want to add 1 textbox behind the last radio button. Default this textbox is disable. When click last radio button, it will be enabled and focus.

I already added it. But i can not set focus when i click on the radio button.

Now i am putting the code in SetContentCore:

 customText.Enabled = true;
 customText.Focus();

But it is not working, because when i click to any radio button, it will run SetContentCore method all rows.

Thanks. 

Dimitar
Telerik team
 answered on 17 Jul 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)
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?