This is a follow-up to my question from last week re a data-driven property grid.
1. Is there any way to remove the white space to the left?
2. In the (abbreviated) code below, I am able to set the ForeColor of the text description but If I try the BackColor, nothing happens. Perhaps a bug?
private void propDataDriven_ItemFormatting(object sender, PropertyGridItemFormattingEventArgs e)
3. Looking at the date entry, I turned off the context menu but the vertical ellipsis still appears when I click in the cell. Nothing happens when I click on this though. is this intended behavior? I'd rather not see it at all.
Thanks
Carl
I'm capturing the event below
Private Sub RadRichTextEditor1_CommandExecuting(sender As Object, e As Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutingEventArgs) Handles RadRichTextEditor1.CommandExecuting
If TypeOf e.Command Is SaveCommand Then
If e.CommandParameter = "pdf" Then
'allow export to pdf
Else
e.Cancel = True
End If
End If
End Sub
I was hoping to find
If TypeOf e.Command Is SaveASCommand - but from what I can see, that doesn't exist.
The problem is - if the user clicks the Save Button or BackStage Save - I'm doing special processing to the database.
But if they click on Save As - It indicates that the user wants to 'export' the document to a pdf or to a word .docx
But in both cases - e.command is always SaveCommand.
It would have been nice to have a (1) SaveCommand and (2) SaveAsCommand
Anyway, is there any event that I can tap into so that these 2 methods can be dealt with differently?
I did add a handler for the SaveButton itself... and that works just fine.
AddHandler RichTextEditorRibbonBar1.QuickAccessToolBarItems(0).MouseDown, AddressOf SaveButton_MouseDown
Maybe you can show me how to create an addhandler for the BackStage Save Menu Option
And
For the BackStage SaveAs Menu Option
That would be of great help and probably solve my special handling needs.
Hi,
I want to display text above the (bottom) border. Therefore, I am experimenting with RadLabel and tried this by setting the ZIndex of LabelElement.LabelText above the ZIndex of LabelElement.LabelBorder which unfortunately does not work. All overlapping letters are just cut. Now, I would need to expand the controls size by which the border would move further below the text which is not what I want.
How can I achieve this?
It would be even better if the border would leave some space around the text like in your web menu here on any "overlapping" letter ("j", "g", "p", "q", "y") but I assume this is not possible.
The ribbon bar has a save button... and I'd like to add special behavior when the user clicks the save button.
Is there any way to intercept or override (with add handler perhaps) the save button click event?
this exception will happen randomly in my program ,but i cann't reproduce it , and it cann't be catched by program. so i want to know when and how will this exception happen . i want to check my program and find if there is such code which will make this exception happen
参数名: index
Source=mscorlib
StackTrace= 在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
在 Telerik.WinControls.UI.ColumnLayoutHelper.ProcessColumnsCollection(List`1 columns)
在 Telerik.WinControls.UI.ColumnLayoutHelper.CalculateColumnsWidth(SizeF availableSize)
在 Telerik.WinControls.UI.TableViewRowLayout.MeasureRow(SizeF availableSize)
在 Telerik.WinControls.UI.RowsContainerElement.MeasureOverride(SizeF availableSize)
在 Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
在 Telerik.WinControls.RadElement.Measure(SizeF availableSize)
在 Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayout()
在 Telerik.WinControls.Layouts.ContextLayoutManager.UpdateLayoutCallback(ILayoutManager manager)
Hi,
I am populating a GridViewComboBoxColumn in RadGridView with data from an ArrayList.
How to set a default value on the column (using index from ArrayList or maybe just using string compare) on grid load?
Please advise.
/Br. Anders
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.