Hi
http://https://demos.telerik.com/blazor-ui/grid/editing-incell demo's incell editing, I noticed that with Ctrl+Enter I can navigate one row down after editing.
I wonder if the editboxes in the grid where not checkboxes (iusing the up and down arrow) I could use the arrow up and down to do the same?
Eric
Is it possible to change the EditMode during Runtime in C#?
please see the following code - MyGrid stays in Incell Editmode.
<Toolbar>
<ToggleButton OnClick=@StartEditMode/>
<ToggleButton OnClick=@StartSelectionMode/>
</Toolbar>
<Grid @ref="_myGrid" EditMode=Incell>
... columns....
</Grid>
</>Grid
StartEditMode()
{
_myGrid.EditMode = GridEditMode.Incell;
_myGrid.SelectionMode = GridSelectionMode.None;
_myGrid.SelectedItemsChanged = EventCallback<IEnumerable<DataItem>>.Empty;
}
StartSelectionMode()
{
_myGrid.EditMode = GridEditMode.None;
_myGrid.SelectionMode = GridSelectionMode.Multiple;
_myGrid.SelectedItemsChanged = Microsoft.AspNetCore.Components.EventCallback.Factory.Create(this, (IEnumerable<DataItem> items) => OnSelectionChanged(items.ToArray()));
}
OnSelectionChanged(DataItem[] items)
{
... do something here
}
Hello,
I have menu table in my database, which have menuid and parentmenuid columns.
I want to bind data retrieved from this table to blazor menu.
Is it possible ? there is no example showing how to bind blazor menu to remote data.
Thanks,
Milind Shevade
@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;
}
}
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
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!

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?
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.