Telerik Forums
UI for Blazor Forum
1 answer
173 views
ValueChanged Event for Complex Types are not firing. Code example as below



@using Telerik.Blazor.Components;
<h1>Hello, Telerik REPL for Blazor! @selectedCodeBase.ItemName </h1>
             
<TelerikComboBox Data="@myComboData" 
    TextField="ItemName" 
    ValueField="ItemKey" 
    TValue="MyDataModel" 
    TItem="MyDataModel"
    ValueChanged="(MyDataModel  s)=>sValueChanged(s)"    
>
</TelerikComboBox>

@code {
public class MyDataModel{
    public string ItemName {get;set;}
    public long ItemKey {get;set;}
}
IEnumerable<MyDataModel> myComboData = Enumerable.Range(1, 20)
       .Select(x => new MyDataModel { ItemName = "item " + x, ItemKey = x });
       

    private MyDataModel selectedCodeBase = new MyDataModel();

 private async void sValueChanged(MyDataModel s)
    {
        await Task.CompletedTask;
    }


}
REPL Example

https://blazorrepl.telerik.com/cmuJFNan441IMFgm37


Please Help.

Thank you
Marin Bratanov
Telerik team
 answered on 22 May 2022
3 answers
135 views

Hi

Using Filtermenu  , an user set a filter on multiple columns,  i want to save  this filter in the database and reuse it later.

Is this possible.

 

Also when filtering , the user can not see what filters he or she placed.

Can it be possible to have a grid property that describes the filter like

( A > 10)  And ( (B=2) or B=3)  ) and COUNTRY = 'USA" ?

This way we can drop a label and attach t to the property

Eric

 

Paul
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 20 May 2022
1 answer
3.6K+ views

Hi, I was looking for a way to specify that a grid column should toggle thru the ListSortDirection in a different order. By default it appears a sortable column toggles through its sort directions in this order:

1st click to sort - Ascending

2nd click - Descending

3rd click - no sort

That works for a majority of our grids and their columns (primarily strings and numbers) but we have some columns like 'Last Modified' dates that I'd like it to:

1st click to sort - Descending

2nd click - Ascending

3rd click - no sort

This would also be more intuitive with our grids that we set their initial sort column to a date column in Descending order on page load. The 'first sort' a user expects is Descending on those columns.

I assume there's a way to use OnStateChanged to do this but it'd involve tracking state changes ourselves and other custom code to try to indicate a certain column should toggle sort directions through different orders. Way too much work for us to introduce into our product at this time. Other tech stacks provide a way to specify the toggle order via column properties, and was hoping such a feature either existed or could be added. Thanks!

Hristian Stefanov
Telerik team
 answered on 20 May 2022
2 answers
799 views
Is there a way to select the entire row automatically when a user presses key up or key down? 
Paul
Top achievements
Rank 1
Iron
Iron
Iron
 updated answer on 20 May 2022
6 answers
1.4K+ views

I like the ability to select a row by clicking on a checkbox. But the handler for clicking on the row supplies the contents of the row where as putting a GridCheckbox like

<GridColumns>
    <GridCheckboxColumn ValueChanged="@((bool value) => ValueChanged(value))"/>

 

only gives me the state of the checkbox. Is there anyway to have the row click handler also respond to the checkbox? Or how can I get the contents of the row that the checkbox that was clicked is on?

Tobias
Top achievements
Rank 1
Iron
 answered on 19 May 2022
1 answer
107 views

Hi,

 

Is it possible to get event when user click/double click task on Gantt chart (grid/timeline). We should update some properties based on selected task.

 

Is it possible to create new dialog for popup editing?

 

 

 

Hristian Stefanov
Telerik team
 answered on 19 May 2022
1 answer
465 views

I am trying to use the Telerik.Blazor.Components.TelerikNumericTextBox.  

Upon opening the form in question, I receive the following in the output window:

   [2022-05-18T14:08:20.156Z] Error: System.AggregateException: One or more errors occurred. (Format specifier was invalid.)
    ---> System.FormatException: Format specifier was invalid.
      at System.Number.NumberToString(ValueStringBuilder& sb, NumberBuffer& number, Char format, Int32 nMaxDigits, NumberFormatInfo info)
      at System.Number.FormatDecimal(Decimal value, ReadOnlySpan`1 format, NumberFormatInfo info)
      at System.Decimal.ToString(String format, IFormatProvider provider)
      at Telerik.Blazor.Common.Parsers.TelerikGenericDecimal`1.Format(T value, String format)
      at Telerik.Blazor.Components.TelerikNumericTextBox`1.get_FormattedValue()
      at Telerik.Blazor.Components.TelerikNumericTextBox`1.get_Text()
      at Telerik.Blazor.Components.TelerikNumericTextBox`1.GetNumericTextBoxOptions()
      at Telerik.Blazor.Components.TelerikNumericTextBox`1.OnAfterRenderAsync(Boolean firstRender)

 

The razor markup for the control is:

                <TelerikNumericTextBox  Width=@ControlWidth.ToString() 
                                        @bind-Value="@NumericValue"
                                        Decimals="2" 
                                        Format="D" 
                                        Id=@FieldProperties.Field_Name
                                        OnChange="@TextOnChangeHandler"/>

 

Right now the control is bound to a Decimal Property  (public decimal NumericValue)

and the initial value is hardcoded to 1200.26M

 

Any assistance would be appreciated.

Ray
Top achievements
Rank 1
Iron
 answered on 18 May 2022
1 answer
704 views
It would be greatly beneficial to our projects if there were enhancements to the Filter component to allow for supplying custom Filter Operators. For example, our legacy software provided native "Between" operator support along with custom "Date Range" operators, such as "today", "Yesterday", "This Week", etc. While I wouldn't expect Telerik to support these out of the box, it would be great to be able to add our own operators/Filter types.
Tsvetomir
Telerik team
 answered on 18 May 2022
7 answers
1.4K+ views

Hello -

I've been really enjoying my time with the Telerik Blazor Grid component, but I'm running into trouble with the filtering functionality.  This is using a Blazor Web Assembly Client with a ASP.NET Core 3 backend.  When my client requests data from the API without a filter, I get appropriate responses as expected.  Paging works great, everything is good.  As soon as I try any off-the-shelf filter, I get an error response from the server with the message :

Could not create an instance of type Telerik.DataSource.IFilterDescriptor. Type is an interface or abstract class and cannot be instantiated.

It looks like this is some sort of deserialization error that is being run into when the server is trying to parse my DataSourceRequest.  It gets parsed fine without a filter, but as soon as I try to filter, I get the above message.

Has anyone else seen and tackled this problem?  Thanks much!

- Chris

 

Jordy
Top achievements
Rank 1
Iron
 answered on 18 May 2022
4 answers
318 views

I don't see any loading indicator when going between pages of a grid with remote data... are there plans for this?

web
Top achievements
Rank 2
Veteran
Iron
 answered on 17 May 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?