You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/multicolumn-combobox/getting-started-with-web-app.md
+8-26Lines changed: 8 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -144,36 +144,18 @@ After initialization, populate the MultiColumn ComboBox with data using the [Dat
144
144
145
145
## Configuring the Columns
146
146
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.
148
148
149
149
{% tabs %}
150
150
{% highlight razor %}
151
151
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">
0 commit comments