Hi,
now I discovered another Problem depending on my last Thread: https://www.telerik.com/forums/avoid-multiple-calls-of-async-updatehandler-when-pressing-enter
Your solution works fine as long as I do not enter the very first value in my grid and it makes no difference which row is changed.
When I enter the first value then the UpdateHandler does not get triggered. Only my ChangeHandler.
Do you have an idea why this is happening?
What is the best way to handle dropdowns sitting in a grid within a column template?
@bind-Value doesn't work well because it sets the selected value of every dropdown in the grid.
I want to be able to send the class object from the current row in the grid to a method on dropdown change, and also know what the new value is of the dropdown.
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(); } }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
Hi,
how can I check the actual grid width to set abbreviated titles on small devices?
Regards,
Peter
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
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?
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
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; }}
