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
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
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
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
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 ...
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,
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!
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
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 :)
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.