| public partial class Form1 : Form |
| { |
| private readonly DataTable dtMain; |
| public Form1() |
| { |
| InitializeComponent(); |
| dtMain = new DataTable(); |
| CreateSampleTable(); |
| InsertValues(); |
| radGridView1.DataSource = dtMain; |
| } |
| private void CreateSampleTable() |
| { |
| dtMain.Columns.Add(new DataColumn("column1", typeof(String))); |
| dtMain.Columns.Add(new DataColumn("column2", typeof(String))); |
| dtMain.Columns.Add(new DataColumn("column3", typeof(String))); |
| } |
| private void InsertValues () |
| { |
| var drMain = dtMain.NewRow(); |
| drMain["column1"] = "1"; |
| drMain["column2"] = "One"; |
| dtMain.Rows.Add(drMain); |
| drMain = dtMain.NewRow(); |
| drMain["column1"] = "2"; |
| drMain["column2"] = "Two"; |
| dtMain.Rows.Add(drMain); |
| drMain = dtMain.NewRow(); |
| drMain["column1"] = "3"; |
| drMain["column2"] = "Three"; |
| dtMain.Rows.Add(drMain); |
| } |
| private void radGridView1_RowFormatting(object sender, Telerik.WinControls.UI.RowFormattingEventArgs e) |
| { |
| var gvri = e.RowElement.RowInfo; |
| var rbApply = gvri.Cells["column3"] != null && gvri.Cells["column3"].CellElement != null ? |
| gvri.Cells["column3"].CellElement.Children[0] as RadButtonElement : null; |
| if (rbApply != null) |
| { |
| rbApply.Text = "Apply"; |
| rbApply.TextAlignment = ContentAlignment.MiddleCenter; |
| } |
| } |
| } |

I have the following
class LookupItem
{
public Guid Id {get;set;}
public string Description {get;set;}
}
class SomeOtherClass
{
public int Key {get;set;}
public Guid LookupItemId {get;set;}
public string SomeProperty {get;set;}
}
Now.
The LookupItem class will be a part of a collection (or lookup list) e.g. List<LookupItem>
The SomeOtherClass is the selectedObject of the propertygrid
I have looked through the samples such as https://docs.telerik.com/devtools/winforms/knowledge-base/propertygrid-dropdown-editor
and whilst I can get the combobox or RadMultiColumnComboBox to display when editing, I need to be able to show the description value of the selected lookupitem in the propertygrid item. Currently its displaying the LookupItem.Id which is a Guid.
Any ideas? The simplest will suffice

I'm following the example of "https://docs.telerik.com/devtools/winforms/controls/gridview/editors/data-validation" to do some data validation and I'm expecting it to show an error message when the user inputs a non-validated string in the cell, like it's shown in the telerik docs, however even though I can see with the debugger that the .ErrorText property is set, a message is not shown (but e.Cancel works and the focus remains on the problematic cell)
I could call a msgbox() to show the message, but I feel that negates the purpose of setting the .ErrorText property. What am I doing wrong?
Information on the Code block:
AbsenceString = "U". SicknessString = "K". gvTimesheet's ShowCellErrors is set to TRUE on the Designer.
Private Sub gvTimesheet_CellValidating(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.CellValidatingEventArgs) Handles gvTimesheet.CellValidating If e IsNot Nothing AndAlso e.Value IsNot Nothing Then Dim column As GridViewDataColumn = TryCast(e.Column, GridViewDataColumn) If TypeOf e.Row Is GridViewDataRowInfo AndAlso column IsNot Nothing AndAlso column.Index >= 5 Then Dim AbsenceOrIllnessMatch As Match = Regex.Match(DirectCast(e.Value, String), "[" & AbsenceString.ToLower & AbsenceString.ToUpper & SicknessString.ToLower & SicknessString.ToUpper & "]{1}\d+") If DirectCast(e.Value, String) <> "" AndAlso Not IsNumeric(DirectCast(e.Value, String)) AndAlso Not AbsenceOrIllnessMatch.Success Then e.Cancel = True DirectCast(e.Row, GridViewDataRowInfo).ErrorText = sa("The hours-worked values can only be numeric, with optional letters {0} or {1} preceding the numeric part to indicate absence hours or illness hours respectively.", AbsenceString, SicknessString) Else DirectCast(e.Row, GridViewDataRowInfo).ErrorText = String.Empty End If End If End IfEnd Sub
how can i align the menu item on the right?
i have inserted a menu item with properties stretch horizontallyl = true.
all other with stretch horizontallyl = false
thanks
andré

Hi. I am trying to programatically create a spreadsheet. I can add data and graphics to the spreadsheet, but I'm not able to add a series chart. Hunting through the Telerik docs, I learned of something called a FloatingChartShape, and I think this is what I need. Unfortunately, I'm not able to get access to this class.
I'm using 2015.1.331.40 of the Telerik.Windows.Documents.Spreadsheets dll.
Can someone point me in the direction of some documentation that describes how to add a series plot to a spreadsheet.
Much thanks,
Steve

Hi,
I have made classes for custom shapes that i have added to my toolbox. All these classes are derived from ElementShape. My problem however is that i would like to get the type of each shape as the way i created them with my own separate classes. Once these custom shapes are dragged from the toolbox and dropped onto the diagram, they are identified as RadDiagramShape. This is a problem because i need to identify of which type each shape is, as the way that i have declared them. For example i have declared a class with an Input shape, and a class with an Output shape. I need to know from the diagram, which shape is of what type, for example is it an input shape or is it an output shape. Because my current code only tells me that it is a RadDiagramShape. This does not allow me to know whether it is an input or an output. I have attached screenshot of the problem and of my code.
Thank you,
Jacques.

I have inherited a radSpinEditor.
All my controls are 21px in height with the Fluent theme.
The bottom part (border) of the control is not shown correctly.
Attached is the rendering
My control:
public partial class IntegerTextBox : RadSpinEditor { public IntegerTextBox() { InitializeComponent(); ShowUpDownButtons = false; Value = 0; DecimalPlaces = 0; TextAlignment = HorizontalAlignment.Right; Padding = new Padding(0, 0, 3, 0); Height = 21; MinimumSize = new Size(0, 20); } }
Here is what was generated in the designer :
// // numericUpDownSalYears// this.numericUpDownSalYears.AutoSize = false;this.numericUpDownSalYears.Location = new System.Drawing.Point(180, 36);this.numericUpDownSalYears.MinimumSize = new System.Drawing.Size(0, 21);this.numericUpDownSalYears.Name = "numericUpDownSalYears";this.numericUpDownSalYears.Padding = new System.Windows.Forms.Padding(0, 0, 3, 0);Hi,
I'm trying to Convert an existing WinForms project
I have loaded our project (WinForms) into VS2015. It has update 3 and is using .NET 4.6.2.
I have run the update wizard.
The "Convert to Telerik Controls" menu does not appear!
I am using the trial version of Telerik, if that makes any difference.
Any idea what I am doing wrong?
Thanks in advance,
Jim

Ok, so we have, like I said above, a scrollable panel, in a page view page and we are using Windows 8 theming in our application. So, when we set all the controls on the form to that theme, any control that is in the Scrollable panel seems to get the back color from the page view page on which the scrollable panel is located instead of the back color from the scrollable panel. This make our controls look weird. Attached is an example of what we are seeing. You will see two scrollable panels, one on the form and the other on a page view page. You can see the differences yourself.
This also happens if you use ThemeResolutionService.ApplicationThemeName = "Windows8" anywhere in our code as well
