Does anyone know how to access the ApplicationMenu on a RadRibbonForm?
I'm trying to add items to the RightColumn area but so far I've not found any documentation on how to get to the Application menu that is NOT added separately but is part of the RadRibbonForm inherently.
Any help would be greatly appreciated!
-Curtis.
I did not find the element, primitive or whatever may be responsible for the color of the hook when a RadCheckBox is checked. Adjusting ButtonElement.CheckMarkPrimitive.CheckElement.ForeColor only applies to the indeterminate square but not to the checked hook.
Am I even able to adjust it's color and would it be dependend of ButtonElement.CheckMarkPrimitive.CheckElement.CheckPrimitiveStyle?
I have some data driven edit fields that I need to edit based on the ControlType enum value in the event handler shown below. Mostly its working, but i have a few questions:
1. Note the commented code in DateEntry. I'd like to customize the date editor as I'm doing this using a DateTimePicker elsewhere in the application. How can I access the properties show in this code?
2. Is there an equivalent of a CheckBox or will I need to use a Yes/no combo box?
Thanks
Carl
void gvDataDriven_EditorRequired(object sender, EditorRequiredEventArgs e)
{
int dataDrivenSetupID = int.Parse(gvDataDriven.CurrentRow.Cells["DataDrivenSetupID"].Value.ToString());
DataDrivenSetup dataDrivenSetup = dataDrivenSetupList.Where(n => n.DataDrivenSetupID == dataDrivenSetupID).FirstOrDefault();
switch ((ControlType)dataDrivenSetup.ControlID)
{
case ControlType.TextBox:
VirtualGridTextBoxEditor virtualGridTextBoxEditor = new VirtualGridTextBoxEditor();
virtualGridTextBoxEditor.MaxLength = dataDrivenSetup.MaxLength.Value;
e.Editor = virtualGridTextBoxEditor;
break;
case ControlType.NumericEntry:
VirtualGridMaskedEditBoxEditor virtualGridMaskedEditBoxEditor = new VirtualGridMaskedEditBoxEditor();
virtualGridMaskedEditBoxEditor.MaskTextBox.MaskType = MaskType.Standard;
virtualGridMaskedEditBoxEditor.MaskTextBox.Mask = "000000.00";
virtualGridMaskedEditBoxEditor.MaskTextBox.TextAlign = HorizontalAlignment.Right;
virtualGridMaskedEditBoxEditor.MaskTextBox.TextMaskFormat = MaskFormat.ExcludePromptAndLiterals;
e.Editor = virtualGridMaskedEditBoxEditor;
break;
case ControlType.DateEntry:
VirtualGridDateTimeEditor virtualGridDateTimeEditor = new VirtualGridDateTimeEditor();
//virtualGridDateTimeEditor.NullText = "MM/DD/YYYY";
//virtualGridDateTimeEditor.NullableValue = null;
//virtualGridDateTimeEditor.SetToNullValue();
//virtualGridDateTimeEditor.Format = DateTimePickerFormat.Short;
//virtualGridDateTimeEditor.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;
e.Editor = virtualGridDateTimeEditor;
break;
case ControlType.CheckBox:
break;
case ControlType.ComboBox:
VirtualGridDropDownListEditor dropDownListEditor = new VirtualGridDropDownListEditor();
RadDropDownListEditorElement element = dropDownListEditor.EditorElement as RadDropDownListEditorElement;
List<Dictionary> data = CommonServices.GetDictionary((EDictionaryType)dataDrivenSetup.DictionaryTypeID, 1, true);
element.DataSource = data;
element.ValueMember = "DictionaryID";
element.DisplayMember = "Description";
element.DropDownStyle = RadDropDownStyle.DropDownList;
e.Editor = dropDownListEditor;
break;
}
}
I am using a MultiComboBox column in a grid to display attribute types. This is the code to add the column:
GridViewMultiComboBoxColumn col = new GridViewMultiComboBoxColumn(""); col.DataSource = maintenance.AttributesTypesSelectAll(); col.DisplayMember = "attributetype"; col.ValueMember = "attributetypeid"; col.FieldName = "attributetypeid"; col.HeaderText = "Type"; this.grdAttributes.Columns.Add(col);
This is the code to show the correct editor when the column is selected:
private void grdAttributes_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { if (this.grdAttributes.CurrentColumn is GridViewMultiComboBoxColumn) { if (!this._isColumnAdded) { this._isColumnAdded = true; RadMultiColumnComboBoxElement editor = (RadMultiColumnComboBoxElement)this.grdAttributes.ActiveEditor; editor.EditorControl.MasterTemplate.AutoGenerateColumns = false; editor.EditorControl.Columns.Add(new GridViewTextBoxColumn("attributetype")); editor.EditorControl.Columns["attributetype"].HeaderText = string.Empty; editor.AutoSizeDropDownToBestFit = true; } } }
This works correctly and maps the column to the right value when the column is loaded, but when I edit the column or add a new column it doesn't retain the value. I feel like I'm missing a step but just not sure what at this point. What is the correct way to use a MultiComboBox in a RadGrid to show the text assoicated with an ID field rather than the ID, and then retain that value on add/edits.
Hi, i'm evaluating radchat for winforms for a messenger project i have to do.
does it natively support multiple authors that are separate from each other? Think a typical messenger like face book messenger etc. you have a list of people you're talking to on the left and the current person you're talking to on the right.
does rad chat support that natively? if not are there any samples or how too's that show this?
i'd like it to know when a different author is posted to the control and put it in the correct person on the left and light up etc showing it's got a new message.
i've tried adding multiple authors to it with different messages but it just puts them all in the same window with different names above them.
i really need them to be separated out into their own conversations.
Thanks!
Hi,
How to change fore color for specific node ? i have 3 level node and want to change fore color for 3rd level node only, below the code i used but not color not changed.
Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
Dim filePath As String = "20230824.124217\20230824.1242174616\00001.tif" Dim filenode As String() = filePath.Split("\") Dim addNode As String = "" For i = 0 To filenode.Count - 1 If addNode = "" Then addNode = filenode(i) Else addNode = addNode & "\" & filenode(i) End If Dim searchKey As String = addNode Dim nodeExists As Boolean = CheckNodeExists(RadTreeView1.Nodes, searchKey) If Not nodeExists Then RadTreeView1.ForeColor = Color.Red Dim folderNode As RadTreeNode = New RadTreeNode() folderNode.ForeColor = System.Drawing.Color.Green RadTreeView1.AddNodeByPath(addNode) End If Next RadTreeView1.Update() RadTreeView1.Refresh()
End Sub
Private Function CheckNodeExists(nodes As RadTreeNodeCollection, searchKey As String) As Boolean
For Each node As RadTreeNode In nodes
If node.FullPath = searchKey Then
' Node found
Return True
End If
' Recursively check child nodes
If node.Nodes.Count > 0 Then
If CheckNodeExists(node.Nodes, searchKey) Then
Return True
End If
End If
Next
' Node not found
Return False
End Function
Pls reply asap.
Thanks and Regards
Aravind
hi all,
I am trying to set some RadDataEntry RadTextBox as ReadOnly, as shown in the following link
https://www.telerik.com/forums/raddataentry-controls-readonly
Here is my code :
private void rdeDynamicInput_ItemInitialized(object sender, ItemInitializedEventArgs e) { if (e.Panel.Controls[0].GetType().ToString() == "Telerik.WinControls.UI.RadCheckBox" || e.Panel.Controls[0].GetType().ToString() == "Telerik.WinControls.UI.RadTextBox") { ((RadTextBox)e.Panel.Controls[0]).ReadOnly = true; } }
Thanks for your help
Best
Patrick
how do I move the pre-built "Delete Row" option to the bottom or move my options to the top?
private void dgvSIQ_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
{
RadMenuItem mniProcess = new RadMenuItem();
RadMenuItem mniVendorInquiry = new RadMenuItem();
RadMenuSeparatorItem mniSeparate = new RadMenuSeparatorItem();
e.ContextMenu.Items[0].Visibility = ElementVisibility.Collapsed;
e.ContextMenu.Items[1].Visibility = ElementVisibility.Collapsed;
mniProcess.Text = "Process PO";
mniVendorInquiry.Text = "Vendor Inquiry";
//e.ContextMenu.Items.Add(mniSeparate);
e.ContextMenu.Items.Add(mniVendorInquiry);
e.ContextMenu.Items.Add(mniProcess);
try
{
mniProcess.Click += mniProcess_Click;
mniVendorInquiry.Click += mniVendorInquiry_Click;
}
catch (Exception)
{
}
}
Hello. Our application is using Telerik WinControls from Q1 2022.
We have a number of context menus where we wish to conditionally disable menu items and show a tooltip that explains why the menu item is disabled. The problem is that when the menu item is disabled then no tooltip is displayed!
How do we get tooltips to display even when the menu item is disabled?
In the following example we would not see the tooltip when menuItem.Enabled = false; Can we get a fix for this? Our work-around is causing other problems.
RadContextMenu contextMenu = new RadContextMenu();
RadMenuItem menuItem = new RadMenuItem("View in Browser");
contextMenu.Items.Add(menuItem);
if (supportsBrowser())
{
menuItem.Tooltip = "Open your browser";
}
else
{
menuItem.Enabled = false;
menuItem.Tooltip = "This device does not support browser access.";
}