Skip to content

Commit 8b47729

Browse files
910110: Update the getting-started-with-web-app.
1 parent 91709a7 commit 8b47729

File tree

1 file changed

+8
-26
lines changed

1 file changed

+8
-26
lines changed

blazor/multicolumn-combobox/getting-started-with-web-app.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -144,36 +144,18 @@ After initialization, populate the MultiColumn ComboBox with data using the [Dat
144144

145145
## Configuring the Columns
146146

147-
The MultiColumn ComboBox supports auto-generating columns, which simplifies the process by automatically creating columns based on the data source. Additionally, you can customize the column header text to reflect specific data, adjust the column width for optimal display, and set the column alignment (left, center, or right) to enhance readability.
147+
The MultiColumn ComboBox supports auto-generating columns, which simplifies the process by automatically creating columns based on the data source. Additionally, you can customize the column header text to reflect specific data, adjust the column [Width](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html) for optimal display, and set the [TextAlign](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html) (left, center, or right) to enhance readability.
148148

149149
{% tabs %}
150150
{% highlight razor %}
151151

152-
<SfMultiColumnComboBox @bind-Value="@Value" DataSource="@Products" ValueField="Name" TextField="Name" Placeholder="Select any product"></SfMultiColumnComboBox>
153-
154-
@code {
155-
public class Product
156-
{
157-
public string Name { get; set; }
158-
public decimal Price { get; set; }
159-
public string Availability { get; set; }
160-
public string Category { get; set; }
161-
public double Rating { get; set; }
162-
}
163-
private List<Product> Products = new List<Product>();
164-
private string Value { get; set; } = "Smartphone";
165-
protected override Task OnInitializedAsync()
166-
{
167-
Products = new List<Product>
168-
{
169-
new Product { Name = "Laptop", Price = 999.99m, Availability = "In Stock", Category = "Electronics", Rating = 4.5 },
170-
new Product { Name = "Smartphone", Price = 599.99m, Availability = "Out of Stock", Category = "Electronics", Rating = 4.3 },
171-
new Product { Name = "Tablet", Price = 299.99m, Availability = "In Stock", Category = "Electronics", Rating = 4.2 },
172-
new Product { Name = "Headphones", Price = 49.99m, Availability = "In Stock", Category = "Accessories", Rating = 4.0 }
173-
};
174-
return base.OnInitializedAsync();
175-
}
176-
}
152+
<SfMultiColumnComboBox @bind-Value="@Value" DataSource="@Products" PopupWidth="600px" ValueField="Name" TextField="Name" Placeholder="Select any product">
153+
<MultiColumnComboboxColumns>
154+
<MultiColumnComboboxColumn Field="Name" Width="200px" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></MultiColumnComboboxColumn>
155+
<MultiColumnComboboxColumn Field="Price" Width="200px" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></MultiColumnComboboxColumn>
156+
<MultiColumnComboboxColumn Field="Availability" Width="200px" TextAlign="Syncfusion.Blazor.Grids.TextAlign.Center"></MultiColumnComboboxColumn>
157+
</MultiColumnComboboxColumns>
158+
</SfMultiColumnComboBox>
177159

178160
{% endhighlight %}
179161
{% endtabs %}

0 commit comments

Comments
 (0)