Good Day Syncfusion Team,
I'm using two SfComboBox in Razor with same DataSource showed here:
<SfComboBox ID="ShipperMaster"
@bind-Value="RrheaderEdit.ShipperId"
DataSource="@ShipperMasters"
TItem="ShipperMaster"
TValue="int"
Placeholder="Select Shipper"
CssClass="e-outline e-success e-multi-column"
AllowCustom="false"
Autofill="true"
AllowFiltering="true"
FloatLabelType="FloatLabelType.Auto"
PopupWidth="300px"
PopupHeight="300px"
Width="160px">
<ComboBoxTemplates TItem="ShipperMaster">
<HeaderTemplate>
<table>
<tr>
<th class="e-text-left combo-width" width="40" align="left">Code</th>
<th width="40" align="left">Shipper</th>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate Context="ComboContext">
<table>
<tbody>
<tr>
<td class="e-text-left combo-width" width="40" align="left">@((ComboContext as ShipperMaster).ShipperCode)</td>
<td width="40" align="left">@((ComboContext as ShipperMaster).Shipper)</td>
</tr>
</tbody>
</table>
</ItemTemplate>
</ComboBoxTemplates>
<ComboBoxFieldSettings Value="ShipperId" Text="ShipperCode"></ComboBoxFieldSettings>
</SfComboBox>
<ValidationMessage For="@(() => RrheaderEdit.ShipperId)" />
<SfComboBox ID="ShipperMaster"
@bind-Value="RrheaderEdit.TruckerId"
DataSource="@ShipperMasters"
TItem="ShipperMaster"
TValue="int"
Placeholder="Select Trucker"
CssClass="e-outline e-success e-multi-column"
AllowCustom="false"
Autofill="true"
AllowFiltering="true"
FloatLabelType="FloatLabelType.Auto"
PopupWidth="300px"
PopupHeight="300px"
Width="160px">
<ComboBoxTemplates TItem="ShipperMaster">
<HeaderTemplate>
<table>
<tr>
<th class="e-text-left combo-width" width="40" align="left">Code</th>
<th width="40" align="left">Trucker</th>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate Context="ComboContext">
<table>
<tbody>
<tr>
<td class="e-text-left combo-width" width="40" align="left">@((ComboContext as ShipperMaster).ShipperCode)</td>
<td width="40" align="left">@((ComboContext as ShipperMaster).Shipper)</td>
</tr>
</tbody>
</table>
</ItemTemplate>
</ComboBoxTemplates>
<ComboBoxFieldSettings Value="ShipperId" Text="ShipperCode"></ComboBoxFieldSettings>
</SfComboBox>
<ValidationMessage For="@(() => RrheaderEdit.TruckerId)" />
The problem is in video I'll uploaded.. please check.. in previous version of syncfusion is OK but in current version: 20.2.0.49 have problem..
Thanks..
Nelson
Hi Nelson,
We have validated a shared code snippet on our end. We suggest you use a unique name for each ComboBox component. Also, we have recreated a sample based on the shared code snippet and shared it below for reference.
Sample : https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox-817758097
Regards,
Udhaya Kumar D