Hi
I am trying to do very simple InCell editing of various columns string etc. In my model i have various Decimal? types fields. When i update the grid incell the
OnUpdate event fires but the property value is always null. Its like its not biding properly. Seems like you have had similar to this bug in previous versions. Seems like a very simple functionality that the grid should support.
Also it doesn't allow me to enter more than 1 digit after this also as if i type a decimal point it jsut clears it.
I have added a video showing this behaviour.
Please assist. This is the Grid code below.
@if (_stockOrderLinePOCO != null)
{
<TelerikGrid @ref="_stockOrderLineGrid"
Width="@AppStateService.ViewPortWidth"
Height="100%"
Data=@_stockOrderLinePOCO.Current
Sortable="@false"
FilterMode="@GridFilterMode.None"
Pageable="true"
Groupable="false"
PageSize="@AppSettings.Value.DataPageSize"
Resizable="true"
Reorderable="false"
EditMode="GridEditMode.Incell"
PageChanged="@StockOrderLineGridPageChangedHandler"
OnRowRender="@StockOrderLineGridRowRenderHandler"
OnUpdate="@StockOrderLineGridUpdateHandler" OnEdit="@StockOrderLineGridEditHandler" OnCancel="@StockOrderLineGridCancelHandler" OnDelete="@StockOrderLineGridDeleteHandler" OnStateInit="@((GridStateEventArgs<StockOrderLine> args) => OnStockOrderLineStateInitHandler(args))">
<GridColumns>
@{
foreach(PropertyInfo prop in (typeof(StockOrderLine)).GetProperties())
{
switch (prop.Name)
{
case "ID":
<GridColumn Field=@prop.Name Title=@Localizer["Line"] FieldType=@prop.GetType() Editable="false"> Width="1rem"</GridColumn>
break;
case "ProductID":
<GridColumn Field=@prop.Name Title=@Localizer["Product"] FieldType=@prop.GetType() Editable="true" Width="40rem">
<Template>
@{
CurrentlyEditedStockOrderLine = context as StockOrderLine;
@CurrentlyEditedStockOrderLine.ProductID @CurrentlyEditedStockOrderLine.ProductDescription
}
</Template>
<EditorTemplate>
@{
CurrentlyEditedStockOrderLine = context as StockOrderLine;
<div class="row">
<div class="col mr-0">
<TelerikComboBox @bind-Value="CurrentlyEditedStockOrderLine.ProductID" Data="@_priceListProducts" TextField="ProductID" ValueField="ProductID" FillMode=@ThemeConstants.DropDownList.FillMode.Outline Filterable="true">
<ItemTemplate Context="subContext">
@subContext.ProductID @subContext.Description_en_AU
</ItemTemplate>
</TelerikComboBox>
</div>
<div class="col ml-0">
<TelerikButton class="mb-0 ml-0" ButtonType="ButtonType.Button" Size="lg" FillMode="outline" Icon="search" @onclick="LookupItem">
</TelerikButton>
</div>
</div>
}
</EditorTemplate>
</GridColumn>
break;
case "ProductDescription":
<GridColumn Field=@prop.Name Title=@Localizer["Description"] FieldType=@prop.GetType() Editable="true"> </GridColumn>
break;
case "QuantityOrdered":
<GridColumn Field=@prop.Name Title=@Localizer["Qty"] FieldType=@prop.GetType() Editable="true"></GridColumn>
break;
case "SalePrice":
<GridColumn Field=@prop.Name Title=@Localizer["Price"] FieldType=@prop.GetType() Editable="true"></GridColumn>
break;
case "Value":
<GridColumn Field=@prop.Name Title=@Localizer["Amount"] FieldType=@prop.GetType() Editable="false"></GridColumn>
break;
default:
break;
}
}
<GridCommandColumn Width="4rem">
<GridCommandButton Command="Delete" Icon="delete"></GridCommandButton>
</GridCommandColumn>
}
</GridColumns>
</TelerikGrid>
}