Is there any way to restrict the user from entering custom text into a databound multicolmncombobox. Forcing them to select an existing item. A dropdown list is not usable as it is bound to a table which has 5000 records. Some filtering based on a couple of fields is required.
Trying to use Lightweight mode but in current browsers it's now working properly and it's even unusable with RadTreeview. I even tried to use your ThemeBuilder but the online sample gives bad results also. Check the image from ThemeBuilder.
I'm using Windows 11, latest version of Edge.
Thank you
Is it possible to subclass the RadTreeNode and get it back on a node click. In the image attached I've made a class inheriting from RadTreeNode named FileTreeNode. It kinda works except my custom properties appear but do not have any data. FIleName is null.
Hello,
I have a usercontrol that provides an Event:
public event EventHandler<FilePickerSelectionEventArgs> FileSelectionChanged;
This event is raised by the control using:
protected void RaiseFilePickerSelectionChangedEvent(ArrayList selectedFiles)
{
// Copy handler to temp var to make operation thread safe:
EventHandler<FilePickerSelectionEventArgs> handler = FileSelectionChanged;
if (FileSelectionChanged!=null)
{
FilePickerSelectionEventArgs args = new FilePickerSelectionEventArgs();
args.SelectedFiles = selectedFiles;
handler(this, args);
}
}
This usercontrol is placed inside an aspx page without masterpage. I need to update other controls that exist on the page when the UC event is raised. So, in the page I placed the code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="filePicker" EventName="FileSelectionChanged">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="labelStatus" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<UC:FilePicker id="filePicker" runat="server" AllowedFileExtensions="jpg,jpeg,png" OnFileSelectionChanged="filePicker_FileSelectionChanged"></UC:FilePicker>
The problem is that RadAjaxManager is not working with this event. I'm sure it's correct because if I change it to something that does not exist, an error is returned saying that no event with that name is found.
Tried doing AjaxSettings in my page code behind but that did not work as well.
Tried to use a simple UpdatePanel:
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Label ID="labelStatus" runat="server"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="filePicker" EventName="FileSelectionChanged" />
</Triggers>
</asp:UpdatePanel>
I have a RadGrid with a GridDateTimeColumn.
This GridDateTimeColumn has EnableRangeFiltering="true" to display the filter :
<telerik:GridDateTimeColumn DataField="xxx" HeaderText="xxx" AutoPostBackOnFilter="true"
SortExpression="xxx" UniqueName="xxx" PickerType="DatePicker"
DataFormatString="{0:D}" EnableRangeFiltering="true" ShowFilterIcon="false">
</telerik:GridDateTimeColumn>
I have changed the currentCulture of the thread to display calendar in French.
But, if I click on the selected month, I have another popup to choose month and years :
I would like to change the label of the three button "Today", "Ok" and "Cancel".
I have access to the RadDatePicker with the RadGrid OnItemDataBound function, but the following code doesn't work :
protected void RadGrid_OnItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
...
} else if (e.Item is GridFilteringItem)
{
GridFilteringItem filterItem = e.Item as GridFilteringItem;
var columns = filterItem.OwnerTableView.RenderColumns
.OfType<GridDateTimeColumn>()
.Where(x => x.AllowFiltering && x.EnableRangeFiltering);
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("fr-FR");
foreach (GridColumn col in columns)
{
...
RadDatePicker picker = filterItem[col.UniqueName].Controls[1] as RadDatePicker;
picker.Calendar.FastNavigationSettings.CancelButtonCaption = "Annuler";
...
}
}
}
Someone knows how I can access on this three button in my c# code to change this property ?
Thanks
We need to add custom message saying upload image size is too big or not after click insert button in the image manager. I know there is a option to do it from clicking upload button but its not match for our requirement.
Like the following image we need to executive custom function after click the insert button.
I using a RadWizard in a page to update other elements. I have a cancel button each step and custom cancel button on the complete step. When attempting to reset the wizard back to the 1st step with client-side code. The wizard goes back to the 1st step. However, the step buttons no longer display, and validation messages remain. Due to the other elements on the page, it would be ideal to reset the wizard back to its original state without having to reload the page.
Any help with this is appreciated.
Cod Snippets below:
Markup:
<telerik:RadWizard ID="wzdNewTimeLine" runat="server" Width="100%" CssClass="Gridheigh4 controlfont" BorderStyle="Solid" BorderWidth="1px" OnClientLoad="wzOnClientLoad" OnClientButtonClicking="wzOnClientButtonClicking">
<WizardSteps>
<telerik:RadWizardStep ID="WizardStep1" runat="server" StepType="Start" Title="Product" CausesValidation="true" CssClass="controlfont" ValidationGroup="prod" DisplayCancelButton="true">
<div class="w3-bar-block">
<span class="w3-bar-item" style="width:50em">
<label><b>Product:</b></label><br />
<telerik:RadComboBox ID="dnProduct" runat="server" DataSourceID="dsProduct" DataTextField="Product" DataValueField="Product" EmptyMessage="Select a Product.." OnClientSelectedIndexChanged="dnProduct_OnIndexChange" Width="30%" CausesValidation="true" ValidationGroup="prod">
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="ProductRequiredFieldValidator" runat="server" ControlToValidate="dnProduct" ValidationGroup="prod" EnableClientScript="true" ForeColor="red"
ErrorMessage="*required field">
</asp:RequiredFieldValidator>
</span>
div class="w3-bar-item">
<h6 class="w3-flat-midnight-blue w3-round"><i class="fa-soild fa-info-circle"></i> Select a Product for this Timeline..</h6>
</div>
</div>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WzardStep2" runat="server" StepType="Step" Title="Review Type" CssClass="controlfont" ValidationGroup="reviewtype" CausesValidation="true" DisplayCancelButton="true">
<div class="w3-bar-block">
<span class="w3-bar-item" style="width:50em"><label><b>Review Type:</b></label><br />
<telerik:RadComboBox ID="dnReviewType" runat="server" DataSourceID="dsUMReviewType" DataTextField="Review_Type" DataValueField="Review_Type" OnClientSelectedIndexChanged="dnReviewType_OnIndexChange" EmptyMessage="Select a Review Type" Width="30%" ValidationGroup="reviewtype" CausesValidation="true">
</telerik:RadComboBox>
<asp:RequiredFieldValidator ID="ReviewTypeRequiredFieldValidator" runat="server" ControlToValidate="dnReviewType" EnableClientScript="true" ValidationGroup="reviewtype" ErrorMessage="*required feild" ForeColor="Red"></asp:RequiredFieldValidator>
</span>
</div>
<div class="w3-bar-item">
<h6 class="w3-flat-midnight-blue w3-round"><i class="fa-solid fa-info-circle"></i> Select the Review Type for this Timeline..</h6>
</div>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizrdStep3" runat="server" StepType="Step" Title="Urgency" CssClass="controlfont" ValidationGroup="urgencycode" CauseValidation="true" DisplayCancelButton="true">
<div class="w3-bar-block">
<span class="w3-bar-item" style="width:50em">
<label><b>Urgency Code:</b></label><br /><telerik:RadComboBox ID="dnUrgencyCode" runat="server" DataSourceID="dsUgencyCode" DataTextField="Urgency_Code" DataValueField="Urgency_Code" EmptyMessage="Select an Urgency Code" OnClientSelectedIndexChanged="dnUrgencyCode_OnIndexChange" Width="30%"></telerik:RadComboBox>
<asp:RequiredFieldValidator ID="UrgencyCodeRequiredFieldValidator" runat="server" ControlToValidate="dnUrgencyCode" ValidationGroup="urgencycode" EnableClientScript="true" ErrorMessage="*required field" ForeColor="Red"></asp:RequiredFieldValidator>
</span>
<div class="w3-bar-item">
<h6 class="w3-flat-midnight-blue w3-round"><i class="fa-solid fa-info-circle"></i> Select an Urgency Code for this Timeline..</h6>
</div>
</div>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStep4" runat="server" StepType="Finish" Title="Deadline Days" CausesValidation="true" ValidationGroup="nodays" DisplayCancelButton="true">
<table style="width:100%">
<tr>
<td style="text-align:right"><b>Days to Deadline:</b></td>
<td style="text-align:left">
<telerik:RadNumericTextBox ID="txtDeadline" runat="server" ToolTip="Number of days to Decision Deadline." Value="0" Width="30%"
NumberFormat-DecimalDigits="0" CausesValidation="true" ValidationGroup="nodays">
</telerik:RadNumericTextBox>
<asp:CustomValidator ID="DeadlineCustomValidator" runat="server" ControlToValidate="txtDeadline" EnableClientScript="true" ValidationGroup="nodays" ForeColor="Red" ErrorMessage="*value must be greater than zero" ClientValidationFunction="ValidateDeadlineDays"></asp:CustomValidator>
</td>
</tr>
<tr>
<td style="text-align:right"><b>Extension Days:</b></td>
<td style="text-align:left">
<telerik:RadNumericTextBox ID="txtExtension" runat="server" ToolTip="Number of days added to deadline form the 'Extension Sent' Value.." Value="0" Width="30%" NumberFormat-DecimalDigits="0" CausesValidation="true" ValidationGroup="nodays"></telerik:RadNumericTextBox>
<asp:CustomValidator ID="ExtensionCustomValidator" runat="server" ControlToValidate="txtExtension" EnableClientScript="true"
ValidationGroup="nodays" ForeColor="red" ErrorMessage="*extensions not valid for Post-Service or Urgent UM" ClientValidationFunction="ValidateExt"></asp:CustomValidator>
</td>
</tr>
<tr>
<td style="text-align:right; vertical-align:middle">
<telerik:RadSwitch ID="ckMMSOnly" runat="server" AutoPostBack="false" CssClass="elasticSwitch" OnClientCheckedChanged="ckMMS_OnChange"></telerik:RadSwitch>
</td>
<td style="text-align:left;padding-left:5px"><b>:Medication Management Only?</b></td>
</tr>
</table>
</telerik:RadWizardStep>
<telerik:RadWizardStep ID="WizardStepComplete" runat="server" StepType="Complete" DisplayCancelButton="true" AllowReturn="true">
<p>Save your changes..</p>
<br />
<br />
<div class="w3-bar">
<div class="w3-bar-item">
<!---- Custom Cancel Button -->
<button class="w3-btn w3-flat-midnight-blue w3-small w3-round"
onclick="btnCancel_OnClick(); return false"><i class="fa-solid fa-cancel"></i> Cancel Changes</button>
</div>
<div class="w3-bar-item">
<button id="btnAdd" class="w3-btn w3-flat-midnight-blue w3-round" onclick="btnAdd_Onclick(); return false"><i class="fa-solid fa-save"></i> Save</button>
</div>
</div>
</telerik:RadWizardStep>
</WizardSteps>
</telerik:RadWizard>
Client-Side Code
<script type="text/javascript">
function wzOnClientLoad(sender, args) {
for (var i = 1; i < sender.get_wizardSteps().get_count() ; i++) {
sender.get_wizardSteps().getWizardStep(i).set_enabled(false);
}
}
function wzOnClientButtonClicking(sender, args) {
var command = args.get_command();
if (command == 3) {
args.set_cancel(true);
btnCancel_OnClick();
//return;
}
if (!args.get_nextActiveStep().get_enabled()) {
args.get_nextActiveStep().set_enabled(true);
}
}
function ValidateDeadlineDays(s, e) {
var wiz = $find("<%=wzdNewTimeLine.ClientID%>");
if (e.Value < 1) {
e.IsValid = false;
}
else {
e.IsValid = true;
document.getElementById("<%=hdnDealineDays.ClientID%>").value = e.Value;
}
}
function ValidateExt(s, e) {
var reviewtype = document.getElementById("<%=hdnReviewType.ClientID%>").value;
var urgencycode = document.getElementById("<%=dnUrgencyCode.ClientID%>").value;
if (e.Value > 0) {
if (reviewtype == "Post-Service" || urgencycode == "Urgent" || urgencycode == "Non-Urgent to Urgent") {
e.IsValid = false;
}
}
else {
e.IsValid = true;
document.getElementById("<%=hdnExtDays.ClientID%>").value = e.Value;
}
}
function ckMMS_OnChange(s, e) {
document.getElementById("<%=hdnMMS.ClientID%>").value = e._checked;
}
function btnAdd_Onclick() {
__doPostBack("<%=pnlTimelines.ClientID%>");
btnCancel_OnClick();
}
function btnNewTL_OnClick() {
var wizcontainer = document.getElementById('newtl');
wizcontainer.style.display = 'block';
var wizard = $find("<%=wzdNewTimeLine.ClientID%>");
wzOnClientLoad(wizard, "");
}
function dnProduct_OnIndexChange(s, e) {
var prod = s.get_value();
if (prod.length > 0) {
document.getElementById("<%=hdnProduct.ClientID%>").value = prod;
}
}
//** Clear out wizard control values and rest to start **
function btnCancel_OnClick() {
$find("<%=dnProduct.ClientID%>").clearSelection();
$find("<%=dnReviewType.ClientID%>").clearSelection();
$find("<%=dnUrgencyCode.ClientID%>").clearSelection();
$find("<%=txtDeadline.ClientID%>").set_value(0);
$find("<%=txtExtension.ClientID%>").set_value(0);
$find("<%=ckMMSOnly.ClientID%>").set_checked(false);
var wizard = $find("<%=wzdNewTimeLine.ClientID%>");
var wizardsteps = wizard.get_wizardSteps();
wizardsteps._data[0].set_active(true);
wizard.set_progressPercent(0);
document.getElementById("<%=hdnProduct.ClientID%>").value = "";
document.getElementById("<%=hdnReviewType.ClientID%>").value = "";
document.getElementById("<%=hdnUrgencyCode.ClientID%>").value = "";
document.getElementById("<%=hdnDealineDays.ClientID%>").value = 0;
document.getElementById("<%=hdnExtDays.ClientID%>").value = 0;
document.getElementById("<%=hdnMMS.ClientID%>").value = false;
document.getElementById('newtl').style.display = 'none';
}
</script>