Telerik Forums
UI for Blazor Forum
1 answer
454 views

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

Svetoslav Dimitrov
Telerik team
 answered on 25 Jun 2021
1 answer
1.0K+ views

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");
}

 

Nadezhda Tacheva
Telerik team
 answered on 25 Jun 2021
1 answer
382 views

Hi

Do you plan to add the viewBox attribute to the svg tag to be able to scale charts?

https://css-tricks.com/scale-svg/#the-viewbox-attribute


Nadezhda Tacheva
Telerik team
 answered on 25 Jun 2021
16 answers
650 views

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.

 

 

Hristian Stefanov
Telerik team
 answered on 24 Jun 2021
1 answer
1.4K+ views

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.

Dimo
Telerik team
 answered on 23 Jun 2021
1 answer
620 views

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

Hristian Stefanov
Telerik team
 answered on 22 Jun 2021
1 answer
1.0K+ views

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

Hristian Stefanov
Telerik team
 answered on 22 Jun 2021
1 answer
770 views

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

Svetoslav Dimitrov
Telerik team
 answered on 22 Jun 2021
1 answer
314 views

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

Dimo
Telerik team
 answered on 22 Jun 2021
1 answer
915 views

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;
    }


Marin Bratanov
Telerik team
 answered on 19 Jun 2021
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?