Telerik Forums
UI for Blazor Forum
9 answers
700 views

Is there a way to set a password char on the blazor textbox?

Thanks … Ed

 

Marin Bratanov
Telerik team
 answered on 02 Mar 2020
2 answers
6.9K+ views
I can add the button, but I need to be able to identify the row that the button was on in the @onclick event so that I can pop-up a form with information specific to that row.
Dan
Top achievements
Rank 1
 answered on 26 Feb 2020
2 answers
1.6K+ views

I have just tested Telerik sample code from :

https://demos.telerik.com/blazor-ui/dropdownlist/overview

@page "/dropdownlist/overview"
@page "/dropdownlist/index"

@using TelerikBlazorDemos.Shared

<div class="example-box-wrapper">
    <div class="example">
        <div class="mb-4">T-Shirt size:</div>
        <TelerikDropDownList Data="@Data"
                             @bind-Value=@SelectedSizeMetric
                             PopupHeight=""
                             DefaultText="Select your T-shirt size"
                             ValueField="SizeMetric" TextField="SizeText">
        </TelerikDropDownList>
    </div>

    <div class="ml-4">
        Selected Size Number: <strong>@SelectedSizeMetric</strong>
    </div>
</div>

@code  {
    public IEnumerable<Size> Data { get; set; }
    public bool AllowCustom { get; set; } = true;
    public int? SelectedSizeMetric { get; set; }
    public string SelectedSize { get; set; }

    public class Size
    {
        public string SizeText { get; set; }
        public int? SizeMetric { get; set; }
    }

    protected override void OnInitialized()
    {
        List<Size> sizes = new List<Size>();

        sizes.Add(new Size()
        {
            SizeText = "X-Small",
            SizeMetric = 3
        });

        sizes.Add(new Size()
        {
            SizeText = "Small",
            SizeMetric = 6
        });

        sizes.Add(new Size()
        {
            SizeText = "Medium",
            SizeMetric = 8
        });

        sizes.Add(new Size()
        {
            SizeText = "Large",
            SizeMetric = 10
        });

        sizes.Add(new Size()
        {
            SizeText = "X-Large",
            SizeMetric = 12
        });

        Data = sizes.AsQueryable();
        base.OnInitialized();
    }
}

 

It works fine as it is.

But if I change:

ValueField="SizeMetric" //int type
for:
ValueField="SizeText" //string type

it nolonger works... I get: System.InvalidCastException : 'Unable to cast object of type 'System.String' to type 'System.Nullable`1[System.Int32]'.'

 

The telerik doc (https://docs.telerik.com/blazor-ui/components/dropdownlist/overview) specifies:

The Value and ValueField can be of types:
number (such as int, double and so on)
string
Guid
Enum

 

 


A
Top achievements
Rank 1
 answered on 24 Feb 2020
2 answers
186 views

I have added Component in <TelerikGrid>/<GridColumn>/<Template>. Grid is loading based on data in a text field. All columns are getting update except column having component.

 

<GridColumns>
        <GridColumn Field="@(nameof(Fee.FEE_ID))" Title="STD">
            <Template>
                @{
                    Fee Fee = context as Fee;
                    <RTP_SMS.Pages.Components.CompStdNN id="@Fee.FEE_ID"></RTP_SMS.Pages.Components.CompStdNN>
                }
            </Template>
        </GridColumn>
 </GridColumns>

 

Atif
Top achievements
Rank 1
 answered on 24 Feb 2020
4 answers
620 views
Hello,
i wanted to know if you are planning on making chipslist component for ui for blazor or not ? 
and the most important feature for a chips list is the ability to add the written word to selected items list with a simple hit on enter key 
so is it gonna be able to work smoothly ?
 
Marin Bratanov
Telerik team
 answered on 23 Feb 2020
1 answer
4.4K+ views

I am using the DataSourceRequest.ToODataString() but the resulting request to my OData is case sensitive. I have seen examples of the $filter clause that uses the OData tolower method to give case-insensitive search.

 

For example, the following calls to me ASP.NET Core 3.1 / Microsoft.AspNetCore.Odata v7.3.0 API all return the same result set; 

https://myapi/v1/accounts?$filter=contains(tolower(AccountName),tolower('eng'))&$top=2&$skip=0&$count=true

https://myapi/v1/accounts?$filter=contains(tolower(AccountName),tolower('Eng'))&$top=2&$skip=0&$count=true

https://myapi/v1/accounts?$filter=contains(tolower(AccountName),tolower('eNg'))&$top=2&$skip=0&$count=true

Is there a way to modify your DataSourceRequest.ToODataString to support this type of client site modification so I can use it to do case-insensitive filters?

 

 

 

Marin Bratanov
Telerik team
 answered on 21 Feb 2020
2 answers
525 views
So I'm experiencing something quite strange, where I have dropdown lists which I pre-populate with static values, those render correctly. 

But when I fill them with a list from an API, they no longer render anything. It just says "NO DATA"... 

This was working before the update. 

Furthermore, I've added a button which calls StateHasChanged but that doesn't resolve anything unfortunately 

And, I've console written the data the dropdown list should render, and the data is there. 
James
Top achievements
Rank 2
 answered on 20 Feb 2020
1 answer
285 views

I am remotely retrieving my paged data that is displayed in my Telerik Blazor UI Grid from an OData ASP.NET Core 3.1 web API

I have several fields that are enums in each of my records. I would like to have the columns that have enum based properties display a combobox in the FilterRow so I can select from the desired enum options to filter my grid. 

 

For example, 

My OData API metadata shows the enum values as;

<p>    <Property Name="AccountType" Type="API.Server.Enums.AccountTypes" Nullable="false" /></p><p></p>

 

And so when I query the API using Postman, I need to use the string .

 

<p>..?$filter=AccountType eq EII.CDAPI.Server.Enums.AccountTypes'Customer' </p><p></p>

 

So, I assume that the filter you would generate from a FilterRow ComboBox selection would have similar syntax. 

Is this possible?

 

 

Marin Bratanov
Telerik team
 answered on 19 Feb 2020
1 answer
302 views

So I am currently running into an issue where, if I set the Width property of a TelerikMultiSelect to 100%, then the popup list spans the entire width of the browser window. As I found this is because the popup list is being appended to the body (well, close to the body) of the DOM and not to the parent widget (in this case a div with the class k-multiselect).

Is there a way to make the popup list match the width of the multiselect, if I set the Width property to 100%?

Marin Bratanov
Telerik team
 answered on 17 Feb 2020
4 answers
271 views

I am trying to create a bar chart inside a grid cell that has labels on the left and values on the right. Is this possible with the Bar Chart component? (see attached file for what I am trying to have the cell look like.

 

Marin Bratanov
Telerik team
 answered on 17 Feb 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?