Hi, I'm using below code to validate items in the data entry. This event triggers whenever the items lose focus.
dataEntry.ItemValidated += (s, e) =>
{
ContactEntries employee = dataEntry.CurrentObject
as
ContactEntries;
if
(e.Label.Text ==
"Contact person:"
)
{
if
(employee.contactPerson.Length < 10)
{
Console.WriteLine(
"validated"
);
e.ErrorProvider.SetError(s
as
Control,
"Field is required"
);
if
(!dataEntry.ValidationPanel.PanelContainer.Controls.ContainsKey(
"Contact person:"
))
{
RadLabel label =
new
RadLabel();
label.Name =
"contactPerson"
;
label.Text =
"<html><size=10><b><color= Red>Contact person: </b><color= Black>First Name should be between 2 and 15 chars long."
;
label.Dock = DockStyle.Top;
label.AutoSize =
false
;
label.BackColor = Color.Transparent;
dataEntry.ValidationPanel.PanelContainer.Controls.Add(label);
}
}
else
{
e.ErrorProvider.Clear();
dataEntry.ValidationPanel.PanelContainer.Controls.RemoveByKey(
"contactPerson"
);
}
}
};
On the first page of the data entry, the items contains predefined values, but the data entry is also connection with a binding navigator, allowing users to add a new page. How can I validate these two pages in case the user does not click each item that will trigger the validation?
Is there some way I can trigger the ItemValidated event manually?
Thanks in advance!
How do I get the RadTabbedFormControlTab in the ContextMenuOpening on which the context menu was called?
RadTabbedFormControl.ContextMenuOpening += (obj, arg) => {
arg.TabItem
// There is only a TabItem, which is not a RadTabbedFormControlTab :(
};
I would like to get the tab on which the menu was called
Greetings,
I am interested in knowing why code 1 works but code 2 below does not in repositioning the scroll on a RadGridView. Also, any posibile solution as to why code 2 does not work would be appreciated. Thank you.
Works:
Code 1 : dvTrackingLog.TableElement.ScrollTo(30, 0);
Code 1a: dvTrackingLog.CurrentRow = dvTrackingLog.Rows[30];
AutoScrollGrid(30);
Code 1b: dvTrackingLog.TableElement.ScrollTo(rowIndex, 0);
Code 1c: dvTrackingLog.CurrentRow = dvTrackingLog.Rows[rowIndex];
Does not work:
Code 2: dvTrackingLog.TableElement.ScrollTo(dvTrackingLog.SelectedRows[0].Index, 0);
Code 2a: dvTrackingLog.CurrentRow = dvTrackingLog.Rows[dvTrackingLog.SelectedRows[0].Index];
AutoScrollGrid(rowIndex);
Code 2b: dvTrackingLog.TableElement.ScrollTo(rowIndex, 0);
Code 2c: dvTrackingLog.CurrentRow = dvTrackingLog.Rows[rowIndex];
I can move and show trackball programmatically from this thread https://www.telerik.com/forums/programatically-move-and-show-trackball.
And how to hide trackball programmatically?
I have successfully located it, but I cannot change the "Agenda View" text. All other items are shown in Spanish.
How could I change that text?
Inherits SchedulerNavigatorLocalizationProvider
Public Overrides Function GetLocalizedString(ByVal id As String) As String
Select Case id
Case SchedulerNavigatorStringId.DayViewButtonCaption
Return "DÃa"
Case SchedulerNavigatorStringId.WeekViewButtonCaption
Return "Semana"
Case SchedulerNavigatorStringId.MonthViewButtonCaption
Return "Mes"
Case SchedulerNavigatorStringId.TimelineViewButtonCaption
Return "LÃnea tiempo"
Case SchedulerNavigatorStringId.AgendaViewButtonCaption
Return "Agenda"
Case SchedulerNavigatorStringId.ShowWeekendCheckboxCaption
Return "Fin de semana"
Case SchedulerNavigatorStringId.TodayButtonCaptionToday
Return "Hoy"
Case SchedulerNavigatorStringId.TodayButtonCaptionThisWeek
Return "Esta semana"
Case SchedulerNavigatorStringId.TodayButtonCaptionThisMonth
Return "Este mes"
Case SchedulerNavigatorStringId.SearchInAppointments
Return "Buscar en citas"
Case SchedulerNavigatorStringId.AgendaViewButtonCaption
Return "Vista Agenda"
End Select
Return String.Empty
End Function
Best Regards
Jaime
Hi,
I have written the below code on VS 2017 form button click suddenly the form is getting shrink. Please help me to solve this issue
using Telerik.Windows.Documents.Flow.Model;
Telerik.Windows.Documents.Flow.Model.RadFlowDocument document = new Telerik.Windows.Documents.Flow.Model.RadFlowDocument();
Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor editor = new Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor(document);
editor.InsertText("Hello world!");
using (Stream output = new FileStream(@"c:\logs\output.docx", FileMode.OpenOrCreate))
{
Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider();
provider.Export(document, output);
}