After I select a product I tab to get to the Trade date field. The cursor get's there, but then move back to the product field, why?
@page "/ManualCertificateTrade"
@attribute [Authorize]
@using Ibex.Shared.Domain
<h3>Manual Certificate Trade</h3>
<TelerikForm Model="@TradeModel" OnValidSubmit="TradeModelValidSubmit" Columns="1" ColumnSpacing="15px" Width="800px">
<FormValidation>
<FluentValidationValidator/>
</FormValidation>
<FormItems>
<FormGroup LabelText="Product" Columns="2" ColumnSpacing="15px">
<FormItem>
<Template>
<label for="Products">Product</label>
<TelerikDropDownList
TValue="int"
TItem="Product"
Id="Products"
Data="@Products"
TextField="Name"
ValueField="Id"
OnChange="@ProductChangedEvent"
Value="@SelectedProductId"
ValueExpression="@(() => SelectedProductId)"
Filterable="true"
DefaultText="Select a product"
FilterOperator="StringFilterOperator.Contains"/>
@* <TelerikValidationMessage For="@(() => TradeModel.ProductId)"/> *@
</Template>
</FormItem>
<FormItem LabelText="Nav" Field="@nameof(TradeModel.NavSellPrice)" Enabled="false"/>
<FormItem LabelText="Issue price" Field="@nameof(TradeModel.StandardBuyPrice)" Enabled="false"/>
<FormItem LabelText="Redemption price" Field="@nameof(TradeModel.StandardSellPrice)" Enabled="false"/>
<FormItem LabelText="Other Issue price" Field="@nameof(TradeModel.OtherBuyPrice)" Enabled="false"/>
<FormItem LabelText="Other Redemption price" Field="@nameof(TradeModel.OtherSellPrice)" Enabled="false"/>
</FormGroup>
<FormGroup LabelText="Dates" Columns="2" ColumnSpacing="15px">
<FormItem>
<Template>
<label for="TradeDate">Trade date</label>
<TelerikDatePicker Id="TradeDate" @bind-Value="TradeModel.TradeDate" Format="dd-MM-yyyy"/>
<TelerikValidationMessage For="@(() => TradeModel.TradeDate)"/>
</Template>
</FormItem>
<FormItem>
<Template>
<label for="SettlementDate">Settle date</label>
<TelerikDatePicker Id="SettlementDate" @bind-Value="TradeModel.SettlementDate" Format="dd-MM-yyyy"/>
<TelerikValidationMessage For="@(() => TradeModel.SettlementDate)"/>
</Template>
</FormItem>
</FormGroup>
<FormGroup LabelText="Price" Columns="2" ColumnSpacing="15px">
<FormItem Hint="Negative quantity is client sell (redemption)">
<Template>
<label for="Quantity">Quantity</label>
<TelerikNumericTextBox Id="Quantity" @bind-Value="TradeModel.Quantity"/>
<div class="k-form-hint">Negative quantity is client sell (redemption)</div>
<TelerikValidationMessage For="@(() => TradeModel.Quantity)"/>
</Template>
</FormItem>
@* <FormItem LabelText="Quantity" Field="@nameof(ManualTrade.Quantity)" Hint="Negative quantity is client sell (redemption)"/> *@
<FormItem LabelText="Nav override (Invision)" Field="@nameof(TradeModel.NavOverride)"/>
<FormItem LabelText="Buy price" Field="@nameof(TradeModel.ManualBuyPrice)" Enabled="@(TradeModel.Quantity > 0)"/>
<FormItem LabelText="Other Buy Cost %" Field="@nameof(TradeModel.OtherBuyCost)" Enabled="@(TradeModel.Quantity > 0)"/>
<FormItem LabelText="Sell price" Field="@nameof(TradeModel.ManualSellPrice)" Enabled="@(TradeModel.Quantity < 0)"/>
<FormItem LabelText="Other Sell Cost %" Field="@nameof(TradeModel.OtherSellCost)" Enabled="@(TradeModel.Quantity < 0)"/>
</FormGroup>
<FormGroup LabelText="Customer information for account-holding fund" Columns="2" ColumnSpacing="15px">
<FormItem LabelText="Customer" Field="@nameof(TradeModel.Customer)" Hint="Ask FundAccounting"/>
<FormItem LabelText="Customer account" Field="@nameof(TradeModel.CustomerAccount)" Hint="Ask FundAccounting"/>
</FormGroup>
</FormItems>
</TelerikForm>
using Blazored.LocalStorage;
using Ibex.Client.Services;
using Ibex.Shared.Domain;
using Ibex.Shared.DTO;
using Microsoft.AspNetCore.Components;
namespace Ibex.Client.Pages;
public partial class ManualCertificateTrade
{
[Inject] public IManualCertificateTradeService TradeService { get; set; }
[Inject] public ILocalStorageService LocalStorageService { get; set; }
private ManualTradeModel TradeModel { get; set; } = new();
private List<Product> Products { get; set; } = new();
private int SelectedProductId { get; set; }
private string SelectedProductName { get; set; }
private bool IsModalVisible { get; set; }
private decimal OtherBuyCost { get; set; }
private decimal OtherSellCost { get; set; }
protected override async Task OnInitializedAsync()
{
Products = await TradeService.GetProducts();
}
private async Task ProductChangedEvent(object id)
{
if (id is int productId)
{
SelectedProductId = productId;
SelectedProductName = Products.FirstOrDefault(x => x.Id == productId)?.Name;
TradeModel = await TradeService.GetNewManualTrade(productId);
OtherBuyCost = TradeModel.OtherBuyCost;
OtherSellCost = TradeModel.OtherSellCost;
}
}
private void TradeModelValidSubmit()
{
IsModalVisible = true;
}
private async Task CreateTrade()
{
var success = await TradeService.CreateManualTrade(TradeModel);
Console.WriteLine($"Trade Created {success}");
}
}
Hi,
I am using the Telerik FileManager with the built in Upload. I can't find the mutliple variable in the Upload settings so I guess it is not possible to drag&drop or select mulitple files with this component?
It is a major setback for us using this because we need to be able to quicken the process of uploading a large number of files.
Did anyone manage to do that?
Thank you !
For over a year I've been saving GridState changes to local storage and then re-applying them when a user returns to that grid. Been working with no issues. I use FilterMode="GridFilterMode.FilterRow" in my grids.
Upon upgrading to 4.0 this no longer works, the grid thinks there are filters but they are not applied correctly. I'm thinking this is due to this breaking change. It would be good to get some more details of this change and why it was made? Cant find any details for it.
CompositeFilterDescriptor
instead of FilterDescriptor
.The odd thing now is FilterDescriptors always use a logical AND and seem to include an additional filter, ie: on a string contains filter, where the field needs to include a null. Below is an example of a contains filter on an example first and last name fields. The additional clauses expecting them to contain a null are not added by me but rather automatically by the grid.
[ { "LogicalOperator": 0, "FilterDescriptors": [ { "Member": "FirstName", "Operator": 8, "Value": "d" }, { "Member": "FirstName", "Operator": 8, "Value": null } ] }, { "LogicalOperator": 0, "FilterDescriptors": [ { "Member": "LastName", "Operator": 8, "Value": "b" }, { "Member": "LastName", "Operator": 8, "Value": null } ] } ]
This state is saved as is in local storage, when a user leaves this screen and returns and the state is re-applied (again this has been working for a year prior to 4.0) the state gets re-applied like the bottom json with 2 filters to blank member names. It seems like to me theres a bug in the re-apply of filters where the grid is not expecting composite filters now?? If I can provide any further details please let me know.
[ { "Member": "", "Operator": 2, "Value": null }, { "Member": "", "Operator": 2, "Value": null } ]
Hello
I set Multiple="true" and I wonder if it's possible to "see" in OnSuccess event the last success upload. Or another event. I need to do something after ALL files are uploaded succefully.
<TelerikUpload SaveUrl="@ImageSaveApiURL"
AllowedExtensions="@AllowedFileTypes"
MaxFileSize="@MaxFileSize"
Multiple="true"
@ref="uploadAlbumPhotosRef"
OnSuccess="OnUploadSuccessHandler"
OnUpload="OnFileUploadHandler" >
</TelerikUpload>
async Task uploadAlbumPhotosRef(UploadSuccessEventArgs e) { if (e.Request.Status == 201) { var infos = new trelAlbumPhotoViewModel(); infos.Id = (Guid)Id; infos.NomFichier = e.Request.ResponseText; FicheEspaceClosDataService.AjouterPhotosAsync(infos); await AfficherPhotos(); //albumPhotosRef.Rebind(); } }
How does one move the text msg & animation higher up the page?
It seems to default to the center of the page.
Example:
I would like that animation and the text message up near the top of the page.
Code:
</TelerikGridLayout>
Those heights are to simulate my long page :).
My form has a DropDownList with products.
I would like to have the last 10 used products on top. I will store the 10 last used products in localstorage and then sort the list, so the MRU items are on top.
Has anyone implemented something similar?
Can I rearrange the items in the DDL without triggering any events. Also can I add a divider between the MRU items and the rest of the products?
I have a dropdownlist on my form, to select products from.
When I load a new product I get the following error:
Cannot validate instances of type 'ManualCertificateTrade'. This validator can only validate instances of type 'ManualTradeModel'
ManualCertificateTrade is my razor view and ManualTradeModel is the model I load from my API.
This is my code behind class.
publicpartialclassManualCertificateTrade
{
[Inject] public IManualCertificateTradeService TradeService { get; set; }
private EditContext EditContext { get; set; }
private ManualTradeModel ManualTradeModel { get; set; } = new();
private ManualTradeValidator TradeValidator { get; set; } = new();
private List<Product> Products { get; set; } = new();
privateint SelectedProductId { get; set; }
protected override async Task OnInitializedAsync()
{
EditContext = new EditContext(ManualTradeModel);
Products = await TradeService.GetProducts();
}
private async Task ProductChangedEvent(object id)
{
if (id isint productId)
{
TradeValidator = null;
SelectedProductId = productId;
ManualTradeModel = await TradeService.GetNewManualTrade(productId);
EditContext = new EditContext(ManualTradeModel);
TradeValidator = new();
}
}
}
Hi, could you advice me please, how can I load data from XML or JSON to TreeView.
Thanks
Peter
I'm looking to change the selected styling of the grid search box.
When currently selected it is set as blue (using the theme I'm using).
I have set up a css class and referenced it from the search box itself. What I don't understand is how to change the selected border styling colour of the search box. This is what I have thus far:
.gridsearchbox {
height: 24px;
margin-right: 4px !important;
font-size: 12px !important;
}
I just want to set the selected border colour to for example red.
Many thanks,
Rob