BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
DropDownList1 value is:@DropVal1
DropDownList2 value is:@DropVal2
@using Syncfusion.EJ2.Blazor;
@using Syncfusion.EJ2.Blazor.DropDowns;
<h3>TestPage</h3>
<p>DropDownList1 value is:<strong>@DropVal1</strong></p>
<EjsDropDownList TItem="Filter1" TValue="string" @bind-Value="@DropVal1" DataSource="@filterList1">
<DropDownListFieldSettings Text="Caption" Value="Name"></DropDownListFieldSettings>
</EjsDropDownList>
<p>DropDownList2 value is:<strong>@DropVal2</strong></p>
<EjsDropDownList TItem="Filter2" TValue="string" @bind-Value="@DropVal2" DataSource="@filterList2">
<DropDownListFieldSettings Text="Caption" Value="Name"></DropDownListFieldSettings>
</EjsDropDownList>
@code {
public string DropVal1 { get; set; }
public string DropVal2 { get; set; }
// NSwagStudio generated class, not working
public class Filter1
{
/// Name of a filter expression
[Newtonsoft.Json.JsonProperty("Name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Name { get; set; }
///Caption of a filter expression
[Newtonsoft.Json.JsonProperty("Caption", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Caption { get; set; }
}
// modified class, working
public class Filter2
{
public string Name { get; set; }
public string Caption { get; set; }
}
// List of items
public List<Filter1> filterList1 = new List<Filter1>() {
new Filter1 { Caption="All Mailpieces", Name="all" },
new Filter1 { Caption="abc Mailpieces", Name="abc" },
new Filter1 { Caption="dde Mailpieces", Name="dde" }
};
public List<Filter2> filterList2 = new List<Filter2> {
new Filter2 { Caption="All Mailpieces", Name="all" },
new Filter2 { Caption="abc Mailpieces", Name="abc" },
new Filter2 { Caption="dde Mailpieces", Name="dde" }
};
} |