Telerik Forums
UI for Blazor Forum
5 answers
1.1K+ views

Hi,

I have a problem that you described here: https://docs.telerik.com/blazor-ui/components/grid/editing/incell

Unfortunately your proposed solution doesn't work or am I missing something?

I am using an EditorTemplate with a method called ChangeHandler(). After clicking in another row everything works fine but if I leave the cell by pressing enter the UpdateHandler gets called more than two times and comparing args.Item with the GridItem doesn't help because the calls are asynchronous.

 

I implemented it like this:

public async Task ChangeHandler()
        {
            var state = Grid?.GetState();
            if (state.EditItem != null)
            {
                await UpdateHandler(new GridCommandEventArgs()
                {
                    Item = state.EditItem,
                    Field = state.EditField
                });
            }
 
            state.OriginalEditItem = state.EditItem = default;
 
            await Task.Delay(50); // let the grid re-render and close the cell if keyboard navigation is enabled
 
            await Grid?.SetState(state);
        }
 
        public async Task UpdateHandler(GridCommandEventArgs args)
        {
            var viewModel = args.Item as ViewModel;
 
            var index = GridItems.FindIndex(i => i.Id == viewModel.Id);
            if (index != -1)
            {
                if (GridItems[index].Equals(viewModel))
                    return;
                ...some more code
 
                //save data
 
                UpdateGridMengen(viewModel);
 
                ...
 
                StateHasChanged();
            }
        }
Joana
Telerik team
 answered on 13 Nov 2020
1 answer
935 views

Since Width is not an option for TextArea, is there anyway to change the size of the TextArea? E.g. set it to 80% of the available div length etc?

thanks

Kevin

Svetoslav Dimitrov
Telerik team
 answered on 13 Nov 2020
1 answer
200 views

Hi,

how can I check the actual grid width to set abbreviated titles on small devices?

Regards,

Peter

Marin Bratanov
Telerik team
 answered on 13 Nov 2020
16 answers
1.9K+ views
Hi, Marin.
Today I spotted some problem in console. My be it's appeared after new 1.6.0 version. Path to java script was not changed long time and this path was taken from 
https://docs.telerik.com/blazor-ui/getting-started/client-blazor

<script src="_content/telerik.ui.for.blazor.trial/js/telerik-blazor.js" defer></script>
Marin Bratanov
Telerik team
 answered on 12 Nov 2020
1 answer
604 views

Sorry if this has been asked before but how can I show a mandatory indicator (a red *) after Title for each mandatory field in popup edit mode? 

Thanks

Kevin

Marin Bratanov
Telerik team
 answered on 12 Nov 2020
7 answers
2.4K+ views

When an item is selected, I want to clear the selection state so that the item isn't indicated as selected.
Note: I do not want to have a default item.

How do accomplish this?

 

Marin Bratanov
Telerik team
 answered on 12 Nov 2020
2 answers
1.2K+ views

Hi there,

We were wondering if it is currently possible to hide a column (Visible = false) but still show it when the user edits the row.
We would not like to show all the columns in the grid but still allow the user to edit some of them.
Currently, when GridColumn.Visible is set to false, the field will not show up in the edit dialog.

Kind regards,
Davin

Kevin
Top achievements
Rank 1
Veteran
 answered on 12 Nov 2020
1 answer
637 views

Documentation suggest a lamba expression in ValueChanged event because it's requiered by framewoek, but for me this sentences are equivalent:

from the handler: @result
<br />
from model: @theTbValue
<br />
 
<TelerikTextBox ValueChanged="@( (string s) => MyValueChangeHandler(s) )" Value="@theTbValue"></TelerikTextBox>
 
<TelerikTextBox ValueChanged="@MyValueChangeHandler" Value="@theTbValue"></TelerikTextBox>
 
@code {
    string result;
 
    public string theTbValue { get; set; } = "lorem ipsum";
 
    private void MyValueChangeHandler (string theUserInput)
    {
        result = string.Format("The user entered: {0}", theUserInput);
 
        //you have to update the model manually because handling the ValueChanged event does not let you use @bind-Value
        theTbValue = theUserInput;
    }
}

 

Kristian
Telerik team
 answered on 11 Nov 2020
1 answer
121 views

Hi, it is possible to apply a column filter only to root level (not on childs) ?

Thank you

Svetoslav Dimitrov
Telerik team
 answered on 11 Nov 2020
1 answer
1.2K+ views

With this code 

<TelerikLoader @bind-Visible="isLoading" />

 

return this error: Object of type 'Telerik.Blazor.Components.TelerikLoader' does not have a property matching the name 'VisibleChanged'.

 

I only wan't show the loader when isLoading it's true.

Svetoslav Dimitrov
Telerik team
 answered on 11 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?