With a Blazor razor page, is there any way of having a FormItem Field conditionally visible in a TelerikForm dependant upon another field?
Use case is where details about person are filled in by the person in question OR a second person.
The second person details are only required if the submiiter isn't the person in question.
The only ways I can think of doing this thus far are:
Both are not scalable if in the model there are several conditional fields. :(
Situation: I have an EF table being displayed in a Telerik Grid.
There is a command field which when clicked goes to a page to an action page that consumes the the record for that row.
I want the button to display in rows that meet a condition in that row's data.
Status (an enum) is the field that will if a certain value the condition is true.
So I guess I need access to row's context. ???
<GridColumn Field="@(nameof(RecordResult.Status))" Title="Status" Width="80px" />
<GridCommandColumn Title="Update" Width="80px">
<GridCommandButton Command="MyOwnCommand" Icon="Information" OnClick="@MyCustomCommandHandler">
Claim
</GridCommandButton>
</GridCommandColumn>
</GridColumns>
</TelerikGrid>
I am unable to get the Scheduler grouping to work in Timeline view., and have many hours attempting to get it to work.
I've followed this demo pretty closely, and MANY different attempts at getting grouping to work.
https://demos.telerik.com/blazor-ui/scheduler/grouping
Is there some property I'm missing that "turns grouping on"? I temporarily added the orientation so I could switch between Horz/Vert.
I've got hours and hours into this. I wish by default if you're configuring a control for something "special" like this, that it would error out and tell you through an exception that you're "missing x or y " or the mapping of a field is invalid or something! In this case, I've got the grouping setup with mapped fields, etc. (If I have invalid fields I get a dictionary error), etc. But no grouping. and NO errors. Very, very frustrating.
My theory is that I'm missing one simple little thing that "turns grouping on", but I'm not seeing it.
Any help, or further questions on my configuration, please feel free to ask.
Thanks in advance,
Curt
Here is my Scheduler Setup below. I will be removing Week view, it's there just to try different things.
<TelerikScheduler Data="@Shifts" Height="100%" Width="100%"
@bind-View="@CurrView"
TitleField="@(nameof(ShiftCalendarBindingModel.ProductionLineName))"
DescriptionField="@(nameof(ShiftCalendarBindingModel.LineTypeName))"
StartField="@(nameof(ShiftCalendarBindingModel.Start))"
EndField="@(nameof(ShiftCalendarBindingModel.End))"
IsAllDayField="@(nameof(ShiftCalendarBindingModel.IsAllDayApt))"
IdField="@(nameof(ShiftCalendarBindingModel.Id))"
Date="@CurrentDate"
DateChanged="@SchedulerDateChangedHandler">
<SchedulerSettings>
<SchedulerGroupSettings Resources="@GroupingResources" Orientation="@GroupingOrientation"></SchedulerGroupSettings>
</SchedulerSettings>
<SchedulerResources>
<SchedulerResource Field="LineTypeId" TextField="LineTypeName" ValueField="Id" Data="@LineTypes"></SchedulerResource>"
</SchedulerResources>
<ItemTemplate>
@{
var appointment = context as ShiftCalendarBindingModel;
}
<div style="height: 100%; width:100%; background-color:@(new MarkupString(appointment.BackGroundColor))">
<p><strong>@appointment.ProductionLineName</strong> Shift: @appointment.ShiftNumber </p>
</div>
</ItemTemplate>
<SchedulerViews>
<SchedulerTimelineView StartTime="@DayStart" EndTime="@DayEnd"ColumnWidth="50" SlotDuration="60" NumberOfDays="1" />
<SchedulerWeekView StartTime="@DayStart" EndTime="@DayEnd" SlotDivisions="2" SlotDuration="60" />
</SchedulerViews>
</TelerikScheduler>
This is what I'm considering "Important" properties:
List<SchedulerGroupOrientation> GroupingOrientationOptions = new List<SchedulerGroupOrientation> { SchedulerGroupOrientation.Horizontal, SchedulerGroupOrientation.Vertical };
private Telerik.Blazor.Components.TelerikScheduler<ShiftCalendarBindingModel> SchedulerRef { get; set; }
List<string> GroupingResources = new List<string> { "LineTypeId" };
public List<LineTypeModel> LineTypes { get; set; } = new List<LineTypeModel>();
public class LineTypeModel
{
public int? Id { get; set; }
public string LineTypeName { get; set; }
}
A few properties from my scheduler model, showing the "LineTypeId":
public class ShiftCalendarBindingModel
{
public long Id { get; set; }
public int? LineTypeId { get; set; }
}
Is there a way to leverage the Grid with normalized data?
I've tried looping through the fields to generate the columns, that's fine. But when it comes to editing them, I can't specify the field in the column as the model doesn't have those properties. This then leads to the field never having a value in the OnEdit callback.
I know I can work around it using OnBlur of all of the input fields, but that's really annoying. Any suggestions?
I've added sample JSON of what it sort of looks like at the bottom.
"lineItems": [
{
"id": 5,
"sortOrder": 2,
"columns": [
{
"id": 77,
"fieldId": 1,
"value": "Test 1",
"lineItemId": 5
},
{
"id": 78,
"fieldId": 7,
"value": "Centerspread",
"lineItemId": 5
},
{
"id": 79,
"fieldId": 8,
"value": "02/02/2022",
"lineItemId": 5
},
{
"id": 80,
"fieldId": 9,
"value": "28/02/2022",
"lineItemId": 5
},
{
"id": 81,
"fieldId": 11,
"value": "4/C",
"lineItemId": 5
},
{
"id": 82,
"fieldId": 13,
"value": "600",
"lineItemId": 5
},
{
"id": 83,
"fieldId": 24,
"value": "01/10/2022",
"lineItemId": 5
},
{
"id": 84,
"fieldId": 26,
"value": "Magazine",
"lineItemId": 5
},
{
"id": 85,
"fieldId": 27,
"value": "Test 1",
"lineItemId": 5
},
{
"id": 86,
"fieldId": 37,
"value": "Internal notes, they are a thing!",
"lineItemId": 5
}
]
I need to add custom text to the delete message. Is there a way to do this?
https://docs.telerik.com/blazor-ui/components/grid/editing/built-in-dialogs/delete-confirmation
Hello
For a recent project I have to display around 100 000 rows in a grid, I have to be able to sort/filter and select certain rows/select all rows in a filter.
Because it's quite a lot of data I've decided to use the OnRead event on the TelerikGrid, this all seems to work fine except for the ability to select all rows (only the rows on the current page are selected). The grid looks something like this:
The code looks something like this:
<TelerikGrid AutoGenerateColumns=true
OnRead="@ReadItems"
TItem=ProductDto
Pageable=true
PageSize=10
Sortable
SelectionMode=@GridSelectionMode.Multiple
FilterMenuType=@FilterMenuType.Menu
FilterMode="GridFilterMode.FilterMenu"
Resizable="true"
ScrollMode="@GridScrollMode.Scrollable"
SelectedItemsChanged="@((IEnumerable<ProductDto> newSelection) => onSelect(newSelection))"
Reorderable="true"
SelectedItems="@selectedProducts"
>
<GridColumns>
<GridCheckboxColumn CheckBoxOnlySelection="true" Reorderable=false SelectAllMode=@GridSelectAllMode.All Width="100px" SelectAll="true" Locked="true" />
<GridColumn Field="@nameof(ProductDto.Id)" Title="@_localizer[nameof(Translations.Id)]" Width="100px" Locked="true" />
<GridColumn Field="@nameof(ProductDto.Code)" Title="@_localizer[nameof(Translations.Code)]" Width="200px" Locked="true" />
<GridColumn Field="@nameof(ProductDto.ExternalReference)" Title="@_localizer[nameof(Translations.ExternalReference)]" Width="200px" Locked="true" Lockable="true" />
<GridColumn Field="@nameof(ProductDto.Description)" Title="@_localizer[nameof(Translations.Description)]" Width="200px" Lockable="true" />
<GridColumn Field="@nameof(ProductDto.BrandCode)" Title="@_localizer[nameof(Translations.BrandCode)]" Width="200px" Lockable="true" />
<GridAutoGeneratedColumns ColumnWidth="200px" />
</GridColumns>
</TelerikGrid>
Since I use the OnRead event, only a small amount of data is available client side, when I click the header checkbox of the GridCheckboxColumn all the items that are available client-side get selected BUT, I would like to be able to tell whether a user clicked the checkbox in the header (=select everything in the grid), or if the user just manually selected all the visible rows of a certain page.
TLDR: How to determine whether a user clicked the header checkbox (= select everything) vs a user manually clicked all items on a certain page. (The selectedItems result is both the same)
Kind regards
Thomas
Hello,
I'm trying to comply with accessibility standards and I'm unable to get the Loader text to be read by screen readers.
I've tried wrapping the Loader component in an aria-live element, using templates, and even loaded up your GitHub loader examples to no avail.
Can you shed some light on what may potentially be happening and how to get it picked up by the screen readers?
Thanks
Is there a way to position a dialog/window next to the button that opened it?
I need to to apply a different color scheme. By default, I am seeing the following. I use bootstrap for theming.
<link href="_content/Telerik.UI.for.Blazor/css/kendo-theme-bootstrap/all.css" rel="stylesheet" />
https://docs.telerik.com/blazor-ui/components/dialog/predefined