I just want to add drag and drop items in a ListView to reorder them.
I don't think adding any code or files here will help.
I want to have a MultiSelect experience for a field in a ListView editor. I'd like the binding to work with the model's navigation collection instead of an ancillary Id collection.
Take the following example where we have a ListView of Appointments. An Appointment has a collection of Contacts called Attendees that we want to manage on Create and Edit with a MultiSelect.
TelerikMultiSelect doesn't like a bind-value with a collection of objects - it wants Ids. One way to solve this could be to do gymnastics with an extra AttendeeIds collection on the Appointment and synchronize that collection with the navigation entities on read/create/update. Is there a way to avoid the gymnastics and solve this case more directly?
Can you provide an example? Thanks.
<TelerikListView TItem="Appointment"...>
...
<EditTemplate>
<TelerikMultiSelect Data="@Contacts" Placeholder="Select attendees" AutoClose="false"
@bind-Value="@context.Attendees" <-this does not work
TextField="@nameof(Contact.Name)" ValueField="@nameof(Contact.Id)"
DebounceDelay="0" />
</EditTemplate>
...
</TelerikListView>
List<Contact> Contacts {get; set;} =[]; //loaded in oninitializeasync
public class Appointment {
public Guid Id {get; set;}
public List<Contact> Attendees {get; set;}
}
public class Contact {
public Guid Id {get; set;}
public string Name {get; set;}
}
...
I tried to figure out how to use different Item Templates within a Listview but I failed.
is it not possible ?
We are using a TelerikGrid which allows to filter various properties.
One of our properties is a name of Id, which is of Guid type.
Of course when we give a full Guid Id into the filter, the filter works, but as soon as we put a partial Guid value the filter breaks, because as expected, it cannot parse the given value.
Error: System.FormatException: Unrecognized Guid format.
at System.Guid.GuidResult.SetFailure(ParseFailure failureKind)
at System.Guid.TryParseGuid(ReadOnlySpan`1 guidString, GuidResult& result)
at System.Guid..ctor(String g)
We have tried to convert guid value into string and then pass it into the filter, but it expects a Guid data type.
Is there a way to internally let the guid filter know, that he should expect a string value instead of Guid? Filtering after Guid doesn't really make sense, since user will most of the time just type a part of the full guid Id value.
Thank you for assistence!
Hi everyone
When using a translated ListView, the page size selector behaves weird.
When the dropdown is opened, the correct text ("Alle") gets displayed. But when the dropdown is closed, the english text is shown,
Any ideas?
Thanks alot and have a nice day
Hi,
I couldn't find OnAdd event for Blazor Listview component CRUD operations(like the one available for Grid) .
I would like to initialize certain properties of the model when 'Add' button is clicked, is there any other workaround?
Thanks,
Deepa
I have a ListView with paging, it's in the editortemplate in a gridview. the column is defined as:
<GridColumn Field="Operators" FieldType="@(typeof(int))" Title="Operators" Width="5rem" Visible="true" ShowColumnChooser="true" ShowColumnMenu="true" Lockable="false" Filterable="true" Editable="true">
<EditorTemplate>
<TelerikListView Data=@AssignedOperators
Pageable="true"
PageSize="5"
Context="operators" >
<HeaderTemplate>
Operators
</HeaderTemplate>
<Template>
<div class="k-card k-card-horizontal">
<div class="k-vbox k-flex-grow">
<div class="k-card-body">
<h4 class="k-card-title">@(operators.FirstName + " " + operators.LastName)</h4>
<h5 class="k-card-subtitle">@operators.CompanyName</h5>
@* <div class="card-date">@context.Date.ToString("MMM dd yyyy")</div> *@
</div>
<div class="k-card-actions k-actions-horizontal k-actions-start">
<ListViewCommandButton OnClick="@RemoveOperator" Enabled="true" FillMode="@(ThemeConstants.Button.FillMode.Outline)">Remove</ListViewCommandButton>
</div>
</div>
@* <img class="k-card-image" src="images/articles/@context.ImageUrl" alt="@context.Subtitle" /> *@
</div>
</Template>
</TelerikListView>
</EditorTemplate>
</GridColumn>