Hi,
with the code :
<GridColumn HeaderText="descrizione" TextAlign="TextAlign.Left" Width="200">
<Template>
@{
var cit = (context as CausaleItem);
Conto ForeignKeyData = GridConti.Where(x => x.id == cit.conto_id).FirstOrDefault();
<span>@ForeignKeyData.descrizionespan>
}
Template>
<EditTemplate>
<SfComboBox ID="ContoId"
TItem="Conto"
TValue="long"
@bind-Value="@((context as CausaleItem).conto_id)"
DataSource="@GridConti"
Enabled="IsEnabled">
<ComboBoxEvents TValue="long" TItem="Conto" />
@*
@{
Conto ForeignKeyData = GridConti.Where(x => x.id == ChildContext.id).FirstOrDefault();
@ForeignKeyData.descrizione
//@ForeignKeyData.descrizione @ForeignKeyData.mastro
}
*@
<ComboBoxFieldSettings Value="id" Text="descrizione">ComboBoxFieldSettings>
SfComboBox>
EditTemplate>
GridColumn>
<GridColumn HeaderText="mastro" AllowEditing="true" AllowAdding="true" TextAlign="TextAlign.Left" Width="200">
<Template>
@{
var cit = (context as CausaleItem);
Conto ForeignKeyData = GridConti.Where(x => x.id == cit.conto_id).FirstOrDefault();
<span>@ForeignKeyData.mastrospan>
}
Template>
<EditTemplate>
@{
var cit = (context as CausaleItem);
if (cit.conto_id > 0)
{
Conto ForeignKeyData = GridConti.Where(x => x.id == cit.conto_id).FirstOrDefault();
<span>@ForeignKeyData.mastrospan>
}
else
{
<span>span>
}
}
EditTemplate>
GridColumn>
<GridColumn HeaderText="sottoconto" AllowEditing="false" AllowAdding="false" TextAlign="TextAlign.Left" Width="200">
<Template>
@{
var cit = (context as CausaleItem);
Conto ForeignKeyData = GridConti.Where(x => x.id == cit.conto_id).FirstOrDefault();
<span>@ForeignKeyData.sottocontospan>
}
Template>
<EditTemplate>
@{
var cit = (context as CausaleItem);
if (cit.conto_id > 0)
{
Conto ForeignKeyData = GridConti.Where(x => x.id == cit.conto_id).FirstOrDefault();
<span>@ForeignKeyData.sottocontospan>
}
else
{
<span>span>
}
}
EditTemplate>
GridColumn>
------------------------------------>
I allow editing to choose a value in the description cell and automatically display the value in the "Mastro" and "Sottoconto" cell in the editing mode;
Unfortunately, in the "add" mode it does not happen as shown in the attached figure.
How can I solve this problem ? Thank you
Greetings
Bye
Attachment: Add_on_Grid1_214be5f3.rar
Hi Biagio,
Greetings from Syncfusion support
Based on your reported issue, we created a sample, but we were unable to reproduce the reported issue in our end version [20.3.0.56]. Kindly check the attached sample for your reference.
If the reported issue persists, or we misunderstood your query kindly share as the below details validate further at our end.
The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible
Regards,
Prathap S