Hello,
I'm working currently on a document viewer module and I would like to know if there's a PDF viewer available.
Something like this https://blazor.syncfusion.com/demos/pdf-viewer/default-functionalities?theme=fabric
in advance thanks,
Andrian
I have a DatePicker bound to a non-nullable DateTime property.
If the user presses delete on a part of the date, that part is reset, and the error shown is "The date format is not parsable. Please enter valid date" rather than the validation message defined in the validator class.
It's then impossible to get rid of this message other than by typing in a valid date. Selecting with the actual picker does not work.
I have made a video to demonstrate: https://youtu.be/twCXE4jTTJs
<TelerikDatePicker Id="dpStartDate" @bind-Value="CurrentlyEditedItem.StartDate" Width="100%" Format="dd/MM/yyyy"></TelerikDatePicker>
public Validator()
{
RuleFor(x => x.SiteId).NotEmpty().WithMessage("Please select a site");
RuleFor(x => x.StartDate).NotEmpty().WithMessage("Please supply a start date");
}
Can you provide an example of how to set column visibility using media breakpoints? For example, I want to be able to display more columns when the user is using an application from a desktop browser and just the essential columns when it's viewed on a phone.
Hello,
I am using Telerik Blazor components in an ASP.net Core MVC app as we are slowly migrating the application to Blazor. My component is inserted into a Razor view using the <component> tag helper.
Inside the component I have the <TelerikRootComponent> surrounding the contents, etc. The component works without any issues. I needed to add a confirmation dialog to use with grid's delete command. Unfortunately, the DialogFactory cascading parameter is always null and thus confirmation dialog cannot be shown. Please advise.
I'm sure I'm just being stupid.. but.. I can't figure out how to add a title/tooltip to a button.... a <GridCommandButton> to be specific.
+6
It currently says 'select files...'
If I change the 'Multiple' property to false how do I change the label to 'select file...' for instance?
Many thanks
Rob
I have a .NET Framework WPF Silverlight app which I am converting across to .NET Core Blazor WebAssembly. The existing app heavily uses binding converters (that implement System.Windows.Data.IValueConverter) throughout the UI codebase.
The <telerik:Rad* controls make use of these converters. Is there an equivalent to this for the Telerik Blazor controls?
N.B. Some of the converters are used in two-way binding.
Some examples of these existing converters:
Imports System.Windows.Data
Public Class DecimalZeroBlankConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
If value Is Nothing Then
Return Nothing
End If
If value = 0 Then
Return Nothing
End If
Dim dec As Decimal = value
Return dec.ToString("###,###,##0.00")
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException
End Function
End Class
Imports System.Windows.Data
Public Class PercentageConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
If value Is Nothing Then
Return 0
End If
Return value * 100
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
If value Is Nothing Then
Return 0
End If
If String.IsNullOrEmpty(value) Then
Return 0
End If
Return value / 100
End Function
End Class
Imports System.Windows.Data
Public Class YesNoVisibilityConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
If value Is Nothing Then
Return Visibility.Collapsed
End If
If value = "Y" Then
Return Visibility.Visible
Else
Return Visibility.Collapsed
End If
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException
End Function
End Class
Imports System.Windows.Data
Public Class BooleanFontWeightConverter
Implements IValueConverter
Public Function Convert(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.Convert
If value Then
Return FontWeights.Bold
Else
Return FontWeights.Normal
End If
End Function
Public Function ConvertBack(value As Object, targetType As Type, parameter As Object, culture As Globalization.CultureInfo) As Object Implements IValueConverter.ConvertBack
Throw New NotImplementedException
End Function
End Class
Hi all,
How does one do the same type of upload as shown in this kendo dojo, but with Blazor upload component? Is template option available with Blazor Upload like they are with kendo Upload?
Please advise if anyone knows.
Thx...,Bob Baldwin
Fluent Consultants
I have a grid where I am setting the initially selected rows and it works fine until I also use the OnStateInit event to set the initial sorting. Once I do that the selections are not set.
<TelerikGrid Data="archivePermissions" Height="100%" Width="100%" ScrollMode="GridScrollMode.Scrollable"
Sortable="true" SortMode="SortMode.Single" SelectionMode="GridSelectionMode.Multiple" @bind-SelectedItems="selectedUsers"
FilterMode="GridFilterMode.FilterRow"
OnStateInit="@((GridStateEventArgs<GetArchivePermissionsModel> args) => OnStateInitHandler(args))">
<GridColumns>
<GridCheckboxColumn SelectAll="true" Width="30px" OnCellRender="@GridHelpers.CenterAlign" />
<GridColumn Field="@(nameof(GetArchivePermissionsModel.LastName))" Title="Last Name" />
<GridColumn Field="@(nameof(GetArchivePermissionsModel.FirstName))" Title="First Name" />
<GridColumn Field="@(nameof(GetArchivePermissionsModel.Role))" Title="Role">
<FilterCellTemplate>
<TelerikComboBox Data="roles" Value="@filteredRole" FilterOperator="StringFilterOperator.Contains"
Width="100%" ValueField="Name" TextField="Name"
ValueChanged="@(async (string val) =>
{
filteredRole = val;
var filter = context.FilterDescriptor.FilterDescriptors[0] as FilterDescriptor;
filter.Value = filteredRole;
if (string.IsNullOrEmpty(filteredRole))
{
await context.ClearFilterAsync();
}
else
{
await context.FilterAsync();
}
})">
</TelerikComboBox>
</FilterCellTemplate>
</GridColumn>
</GridColumns>
</TelerikGrid>
private void GetArchive()
{
var dbRoles = SecurityRepository.GetRoles();
roles = Mapper.Map<IEnumerable<ApplicationRole>, IEnumerable<RoleViewModel>>(dbRoles);
var dbArchive = DatabaseArchivingRepository.GetArchive(ArchiveId);
archive = Mapper.Map<Archive, ArchiveViewModel>(dbArchive);
origName = archive.DisplayName;
archivePermissions = DatabaseArchivingRepository.GetArchivePermissions(ArchiveId).ToList();
selectedUsers = archivePermissions.Where(a => a.HasAccess).ToList();
}
private void OnStateInitHandler(GridStateEventArgs<GetArchivePermissionsModel> args)
{
var state = new GridState<GetArchivePermissionsModel>
{
SortDescriptors = new List<SortDescriptor>()
{
new SortDescriptor("LastName", ListSortDirection.Ascending)
}
};
args.GridState = state;
}