Skip to content

Commit 6f588f5

Browse files
authored
Merge pull request #4914 from syncfusion-content/BLAZ-911019-PreView2
911019: Need to provide preview sample for Multicolumn ComboBox
2 parents 9a3138e + 89c86f0 commit 6f588f5

File tree

10 files changed

+67
-20
lines changed

10 files changed

+67
-20
lines changed

blazor/multicolumn-combobox/custom-value.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ You can include custom values in the MultiColumn ComboBox component. If the ente
4949
{% endhighlight razor %}
5050
{% endtabs %}
5151

52+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rtBftEMuAkIFhdAn?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
5253

5354
![Blazor MultiColumn ComboBox with custom value](./images/blazor-multicolumn-custom-value.gif)

blazor/multicolumn-combobox/data-binding.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ The MultiColumn ComboBox loads the data from local data sources through the [Dat
2323

2424
{% endhighlight %}
2525

26+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BZLftusaTrQvPHgm?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
27+
2628
![Blazor ComboBox with local data binding](./images/data-binding/blazor_combobox_local-binding.png)
2729

2830
## Index value binding
@@ -65,6 +67,8 @@ Index value binding can be accomplished with the `bind-Index` attribute, which s
6567
}
6668
```
6769

70+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rDBTtYiOqwKUHZCY?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
71+
6872
### Expando object binding
6973

7074
Bind the [ExpandoObject](https://learn.microsoft.com/en-us/dotnet/api/system.dynamic.expandoobject?view=net-5.0) data to the MultiColumn ComboBox component. In the following example, the `ExpandoObject` is bound to the collection of vehicles data.
@@ -75,7 +79,7 @@ Bind the [ExpandoObject](https://learn.microsoft.com/en-us/dotnet/api/system.dyn
7579

7680
{% endhighlight %}
7781

78-
![Blazor ComboBox with Expando object binding](./images/data-binding/blazor_combobox_expando-object-binding.png)
82+
![Blazor ComboBox with Expando object binding](./images/data-binding/blazor_combobox_expando-object-binding.gif)
7983

8084
### Dynamic object binding
8185

@@ -87,7 +91,7 @@ Bind the [DynamicObject](https://learn.microsoft.com/en-us/dotnet/api/system.dyn
8791

8892
{% endhighlight %}
8993

90-
![Blazor ComboBox with Dynamic object binding](./images/data-binding/blazor_combobox_dynamic-data-binding.png)
94+
![Blazor ComboBox with Dynamic object binding](./images/data-binding/blazor_combobox_dynamic-data-binding.gif)
9195

9296
### ValueTuple data binding
9397

@@ -99,6 +103,8 @@ Bind the [ValueTuple](https://learn.microsoft.com/en-us/dotnet/api/system.valuet
99103

100104
{% endhighlight %}
101105

106+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNBJXOWYqcwRBUbm?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
107+
102108
## Binding remote data
103109

104110
The MultiColumn ComboBox loads the data from remote data services through the [DataSource](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_DataSource) property.
@@ -119,6 +125,8 @@ The [OnActionBegin](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Mult
119125

120126
{% endhighlight %}
121127

128+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BXhTXOBtLtGPxmzl?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
129+
122130
### OnActionFailure event
123131

124132
The [OnActionFailure](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_OnActionFailure) event triggers when the data fetch request from the remote server fails.
@@ -129,6 +137,8 @@ The [OnActionFailure](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Mu
129137

130138
{% endhighlight %}
131139

140+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjhpjYWagPigEDli?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
141+
132142
### OData v4 services
133143

134144
The [OData v4 Adaptor](https://blazor.syncfusion.com/documentation/data/adaptors#odatav4-adaptor) provides the ability to consume and manipulate data from OData v4 services. The following sample displays the first six customer details from `Customers` table of the `Northwind` Data Service.
@@ -139,6 +149,8 @@ The [OData v4 Adaptor](https://blazor.syncfusion.com/documentation/data/adaptors
139149

140150
{% endhighlight %}
141151

152+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjrfXYsuKbAMJeTB?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
153+
142154
![Blazor ComboBox with OData v4 Adaptor](./images/data-binding/blazor_combobox_odata-v4-services.png)
143155

144156
### Web API adaptor
@@ -151,6 +163,8 @@ The [Web API Adaptor](https://blazor.syncfusion.com/documentation/data/adaptors#
151163

152164
{% endhighlight %}
153165

166+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hXrTXaVNLsiKTDqf?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
167+
154168
![Blazor ComboBox with Web API Adaptor](./images/data-binding/blazor_combobox_web-api-adaptor.png)
155169

156170
### Offline mode
@@ -165,6 +179,7 @@ The following example is for remote data binding and enabled offline mode.
165179

166180
{% endhighlight %}
167181

182+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNBTDYiueZHDbZmB?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
168183

169184
### Entity Framework
170185

blazor/multicolumn-combobox/filtering.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ The following code demonstrates the filtering functionality with local data in t
2121

2222
{% endhighlight %}
2323

24+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZVpZOCaUbksiExT?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
25+
2426
![Blazor MultiColumn ComboBox with local data filtering](./images/filtering/blazor_combobox_local-data.png)
2527

2628
## Remote data
@@ -35,6 +37,8 @@ The following code illustrates the filtering capabilities using the [ODataAdapto
3537

3638
{% endhighlight %}
3739

40+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNVpDEWEAkDqmrEI?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
41+
3842
## Filter type
3943

4044
You can use [FilterType](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_FilterType) property to specify on which filter type needed to be considered on the search action of the component. The available `FilterType` and its supported data types are:
@@ -53,6 +57,8 @@ In the following example, `EndsWith` filter type has been mapped to the `FilterT
5357

5458
{% endhighlight %}
5559

60+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BNrftaBZLMRWvRyO?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
61+
5662
![Blazor MultiColumn ComboBox with Filter Type](./images/filtering/blazor_combobox_filter-type.png)
5763

5864
<!-- ## Minimum filter length
@@ -127,4 +133,6 @@ In the following example, the isTyped flag is used to track whether the filterin
127133

128134
{% include_relative code-snippet/filtering/prevent-popupopen-in-filtering.razor %}
129135

130-
{% endhighlight %}
136+
{% endhighlight %}
137+
138+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rjBzZYVjLimaBuKY?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
54.1 KB
Loading
59.1 KB
Loading
56.7 KB
Loading

blazor/multicolumn-combobox/placeholder-and-floatlabel.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Utilize the [Placeholder](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazo
1919

2020
{% endhighlight %}
2121

22+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjVpXEWYAYcFnftW?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
23+
2224
![Blazor ComboBox with placeholder](./images/placeholder-and-floatlabel/blazor_combobox_placeholder.png)
2325

2426
<!-- ## Color of the placeholder text
@@ -29,9 +31,7 @@ You can change the color of the placeholder by targeting its CSS class `input.e-
2931
3032
{% include_relative code-snippet/placeholder-and-floatlabel/placeholder-with-color.razor %}
3133
32-
{% endhighlight %}
33-
34-
![Blazor ComboBox with color placeholder](./images/placeholder-and-floatlabel/blazor_combobox_placeholder-with-color.png) -->
34+
{% endhighlight %} -->
3535

3636
## Add mandatory indicator using placeholder
3737

@@ -43,6 +43,8 @@ The mandatory indicator `*` can be applied to the placeholder by targeting its C
4343

4444
{% endhighlight %}
4545

46+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNhfXuWkpfiTqsiM?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
47+
4648
![Blazor ComboBox with mandatory indicator placeholder](./images/placeholder-and-floatlabel/blazor_combobox_placeholder-with-mandatory.png)
4749

4850
## FloatLabel
@@ -65,6 +67,8 @@ The `FloatLabelType` as `Auto` is demonstrated in the following code sample.
6567

6668
{% endhighlight %}
6769

70+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LDLJtasupZNuHICO?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
71+
6872
![Blazor ComboBox with float label](./images/placeholder-and-floatlabel/blazor_combobox_floatlabel.gif)
6973

7074
<!-- ## Customizing the float label element’s focusing color
@@ -75,6 +79,4 @@ You can change the text color of the floating label when it is focused by target
7579
7680
{% include_relative code-snippet/placeholder-and-floatlabel/floatlabel-focusing-color.razor %}
7781
78-
{% endhighlight %}
79-
80-
![Blazor ComboBox with float label focusing color](./images/placeholder-and-floatlabel/blazor_combobox_floatlabel-focusing-color.png) -->
82+
{% endhighlight %} -->

blazor/multicolumn-combobox/selection.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Retrieve the selected value from the MultiColumn ComboBox component during the [
1919

2020
{% endhighlight %}
2121

22+
{% previewsample "https://blazorplayground.syncfusion.com/embed/BthftYMaJBNGrdDn?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
23+
2224
Retrieve the full object list corresponding to the selected value in the [ValueChange](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_ValueChange) event by utilizing the [ValueChangeEventArgs.ItemData](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.ValueChangeEventArgs-2.html#Syncfusion_Blazor_MultiColumnComboBox_ValueChangeEventArgs_2_ItemData) property.
2325

2426
{% highlight cshtml %}
@@ -27,6 +29,8 @@ Retrieve the full object list corresponding to the selected value in the [ValueC
2729

2830
{% endhighlight %}
2931

32+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjLfZOMYJBsbSpiT?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
33+
3034
## Preselected value on OnInitializedAsync
3135

3236
To associate a pre-selected value with the MultiColumn ComboBox component, use the [@bind-Value](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_Value) attribute. You can set the value property in the [OnInitializedAsync](https://learn.microsoft.com/en-us/aspnet/core/blazor/components/lifecycle?view=aspnetcore-6.0#component-initialization-oninitializedasync) lifecycle method. The following example illustrates how to bind the value when the component is initially rendered.
@@ -37,6 +41,8 @@ To associate a pre-selected value with the MultiColumn ComboBox component, use t
3741

3842
{% endhighlight %}
3943

44+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hjLTtOMYoiBxOutq?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
45+
4046
![Blazor ComboBox with pre-select value](./images/selection/blazor_combobox_preselect-value.png)
4147

4248
## Programmatically change the selected value
@@ -49,6 +55,8 @@ You can change the component's value either programmatically or externally via t
4955

5056
{% endhighlight %}
5157

58+
{% previewsample "https://blazorplayground.syncfusion.com/embed/htBTtaWOTIoCCOww?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
59+
5260
![Blazor ComboBox with pre-select value before](./images/selection/blazor_combobox_changing-selected-value.gif)
5361

5462
### ValueChange event
@@ -61,6 +69,8 @@ The [ValueChange](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiC
6169

6270
{% endhighlight %}
6371

72+
{% previewsample "https://blazorplayground.syncfusion.com/embed/rNBTjaikpWnchtLT?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
73+
6474
### OnValueSelect event
6575

6676
The [OnValueSelect](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_OnValueSelect) event is activated whenever a value is chosen in the DropDownList component. You can access the relevant arguments, including the [ValueSelectEventArgs.ItemData](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.ValueChangeEventArgs-2.html#Syncfusion_Blazor_MultiColumnComboBox_ValueChangeEventArgs_2_ItemData). Additionally, you can prevent item selection by setting the [ValueSelectEventArgs.Cancel](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.ValueChangeEventArgs-2.html#Syncfusion_Blazor_MultiColumnComboBox_ValueChangeEventArgs_2_Cancel) property to `true` within the event arguments.
@@ -71,6 +81,8 @@ The [OnValueSelect](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Mult
7181

7282
{% endhighlight %}
7383

84+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VZhTtkMaJMoQeBSK?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
85+
7486
## Preselect value with index
7587

7688
Bind the pre-selected value to the component using the [@bind-Index](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_Value) attribute. It binds the respective value present in the specified index position of the datasource.
@@ -83,6 +95,8 @@ The following sample shows how to bind the index on the initial rendering.
8395

8496
{% endhighlight %}
8597

98+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LZBJDOiEpMTRyGJU?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
99+
86100
![Blazor MultiColumn ComboBox with bind-index](./images/selection/blazor_combobox_preselect-value-index.png)
87101

88102
<!-- ## Autofill the selected value
@@ -93,9 +107,7 @@ The [Autofill]() property determines if the component's input field will automat
93107
94108
{% include_relative code-snippet/selection/auto-fill.razor %}
95109
96-
{% endhighlight %}
97-
98-
![Blazor ComboBox with Autofill property](./images/selection/blazor_combobox_with-autofill-property.gif) -->
110+
{% endhighlight %} -->
99111

100112
<!-- ## Get selected item by value
101113
@@ -117,6 +129,8 @@ Focus the component programmatically using the [FocusAsync](https://help.syncfus
117129

118130
{% endhighlight %}
119131

132+
![Blazor ComboBox with Focus the next component on selection](./images/selection/blazor_combobox_focus-next-component.gif)
133+
120134
<!-- ## Programmatically clear the selected value
121135
122136
To programmatically reset the value of the MultiColumn ComboBox, you can utilize the [ClearAsync]() method. This method removes any selected values from the SfComboBox<TValue, TItem> component and sets both the [Value](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_Value) and [Index](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_Index) properties to null.
@@ -125,9 +139,7 @@ To programmatically reset the value of the MultiColumn ComboBox, you can utilize
125139
126140
{% include_relative code-snippet/selection/programmatically-clear-value.razor %}
127141
128-
{% endhighlight %}
129-
130-
![Blazor ComboBox with programatically clear value](./images/selection/blazor_combobox_with-programmatically-clear-value.gif) -->
142+
{% endhighlight %} -->
131143

132144
## Prevent reload on form submit
133145

@@ -139,6 +151,8 @@ To prevent the page from reloading when using the MultiColumn ComboBox component
139151

140152
{% endhighlight %}
141153

154+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjhpNuWOfWMzQIrf?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
155+
142156
<!-- ## Programmatically trigger onChange event
143157
144158
Trigger the [ValueChange](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_ValueChange) event manually by using the instance (taken from @ref attribute) of the component. In the following example, the `ValueChange` event is invoked inside the `Created` event handler. As per the following code, it will trigger once the component is created or rendered on the page.
@@ -171,6 +185,8 @@ The [Focus](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnC
171185

172186
{% endhighlight %}
173187

188+
{% previewsample "https://blazorplayground.syncfusion.com/embed/VXLpNEMkpWjDUxyW?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
189+
174190
### Blur event
175191

176192
The [Blur](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnComboBox.SfMultiColumnComboBox-2.html#Syncfusion_Blazor_MultiColumnComboBox_SfMultiColumnComboBox_2_Blur) event will trigger when focus moves out from the component.
@@ -179,4 +195,6 @@ The [Blur](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.MultiColumnCo
179195

180196
{% include_relative code-snippet/selection/blur-event.razor %}
181197

182-
{% endhighlight %}
198+
{% endhighlight %}
199+
200+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDrJZkiapZPZlLCm?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}

blazor/multicolumn-combobox/value-binding.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ The Index value binding is accomplished through the [@bind-Index]() attribute, w
4040

4141
{% endhighlight %}
4242

43+
{% previewsample "https://blazorplayground.syncfusion.com/embed/hDLfZasEAxNRINSJ?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
4344

4445
![Blazor MultiColumn ComboBox with Index Value](./images/value-binding/blazor_combobox_index-value.png)
4546

@@ -53,9 +54,7 @@ In the example provided, the `Name` column is linked to the [ValueField](https:/
5354
5455
{% include_relative code-snippet/value-binding/object-binding.razor %}
5556
56-
{% endhighlight %}
57-
58-
![Blazor MultiColumn ComboBox with object values](./images/value-binding/blazor_combobox_object-binding.png) -->
57+
{% endhighlight %} -->
5958

6059
## Show or hide clear button
6160

@@ -71,6 +70,8 @@ The following example illustrates the use of `string` as the TValue. Therefore,
7170

7271
{% endhighlight %}
7372

73+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjLJDEskURJpKyLy?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
74+
7475
![Blazor ComboBox with clear button](./images/value-binding/blazor_combobox_show-hide-clear-button.png)
7576

7677
## Dynamically change TItem
@@ -109,7 +110,7 @@ First, create a `MultiColumnComboBox.razor` file as a parent component in the `/
109110

110111
Then, render the Generic MultiColumn ComboBox component with the required `TValue` and `TItem` in the respective razor components.
111112

112-
Here, the MultMultiColumn ComboBox component with TValue as an int nullable type in the `/Index.razor` file.
113+
Here, the MultiColumn ComboBox component with TValue as an int nullable type in the `/Index.razor` file.
113114

114115
**[Index.razor]**
115116

blazor/multicolumn-combobox/virtualization.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ This feature is applicable to both local and remote data scenarios, providing fl
3333

3434
{% endhighlight %}
3535

36+
{% previewsample "https://blazorplayground.syncfusion.com/embed/LjBpNYCkfVIICLcf?appbar=true&editor=true&result=true&errorlist=true&theme=bootstrap5" %}
37+
3638
![Blazor MultiColumn ComboBox with virtualization](./images/blazor_multicolumn_combobox_remote-data-virtualization.gif)

0 commit comments

Comments
 (0)