Skip to content

Commit 210e788

Browse files
Merge pull request #2679 from syncfusion-content/EJ2-866027-createPopupDev
documentation(866027): Documented the usage of createPopupOnClick property in the Ribbon dropdownbutton
2 parents 14541ec + 2b90e1d commit 210e788

File tree

2 files changed

+72
-2
lines changed

2 files changed

+72
-2
lines changed

ej2-asp-core-mvc/ribbon/EJ2_ASP.MVC/items.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010

11-
# Items in ASP.NET MVC Ribbon control
11+
# Items in ##Platform_Name## Ribbon control
1212

1313
Ribbon renders various built-in items based on the item [Type](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Ribbon.RibbonItem.html#Syncfusion_EJ2_Ribbon_RibbonItem_Type) property. By default, the type property is set as `Button` which renders the Button.
1414

@@ -214,6 +214,39 @@ The following sample showcases how to customize a specific dropdown item.
214214
{% endhighlight %}
215215
{% endtabs %}
216216

217+
#### Create dropdown popup on demand
218+
219+
You can handle the creation of popups, by using the [createPopupOnClick](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Ribbon.RibbonDropDownSettings.html#Syncfusion_EJ2_Ribbon_RibbonDropDownSettings_CreatePopupOnClick) property. If set to `true`, the popup will only be created upon opening. By default the value is `false`.
220+
221+
{% tabs %}
222+
{% highlight c# tabtitle="Index.cshtml" %}
223+
224+
@using Syncfusion.EJ2.Ribbon
225+
@using Syncfusion.EJ2.Navigations
226+
227+
@{
228+
List<MenuItem> tableOptions = new List<MenuItem>() { new MenuItem { Text = "Insert Table" }, new MenuItem { Text = "This device" }, new MenuItem { Text = "Convert Table" }, new MenuItem { Text = "Excel SpreadSheet" } };
229+
}
230+
@Html.EJS().Ribbon("ribbon").Tabs(tab =>
231+
{
232+
tab.Header("Insert").Groups(group =>
233+
{
234+
group.Header("Tables").Collections(collection =>
235+
{
236+
collection.Items(items =>
237+
{
238+
items.Type(RibbonItemType.DropDown).DropDownSettings(dropDown =>
239+
{
240+
dropDown.IconCss("e-icons e-table").Content("Table").Items(tableOptions).CreatePopupOnClick(true);
241+
}).Add();
242+
}).Add();
243+
}).Add();
244+
}).Add();
245+
}).Render()
246+
247+
{% endhighlight %}
248+
{% endtabs %}
249+
217250
### Split button items
218251

219252
You can render the built-in splitButton Ribbon item by setting the [Type](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Ribbon.RibbonItem.html#Syncfusion_EJ2_Ribbon_RibbonItem_Type) property to `SplitButton` you can render a splitButton item. You can also customize the SplitButton item through [RibbonSplitButtonSettings](https://help.syncfusion.com/cr/aspnetmvc-js2/Syncfusion.EJ2.Ribbon.RibbonSplitButtonSettings.html#properties), which provides options such as `IconCss`, `Items`, `Target` and more.

ej2-asp-core-mvc/ribbon/EJ2_ASP.NETCORE/items.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ publishingplatform: ##Platform_Name##
88
documentation: ug
99
---
1010

11-
# Items in ASP.NET Core Ribbon control
11+
# Items in ##Platform_Name## Ribbon control
1212

1313
Ribbon renders various built-in items based on the item [type](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Ribbon.RibbonItem.html#Syncfusion_EJ2_Ribbon_RibbonItem_Type) property. By default, the type property is set as `Button` which renders the Button.
1414

@@ -230,6 +230,43 @@ The following sample showcases how to customize a specific dropdown item.
230230
{% endhighlight %}
231231
{% endtabs %}
232232

233+
#### Create dropdown popup on demand
234+
235+
You can handle the creation of popups, by using the [createPopupOnClick](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Ribbon.RibbonDropDownSettings.html#Syncfusion_EJ2_Ribbon_RibbonDropDownSettings_CreatePopupOnClick) property. If set to `true`, the popup will only be created upon opening. By default the value is `false`.
236+
237+
{% tabs %}
238+
{% highlight c# tabtitle="Index.cshtml" %}
239+
240+
@using Syncfusion.EJ2.Ribbon
241+
@using Syncfusion.EJ2.Navigations
242+
243+
@{
244+
List<MenuItem> tableOptions = new List<MenuItem>() { new MenuItem { Text = "Insert Table" }, new MenuItem { Text = "This device" }, new MenuItem { Text = "Convert Table" }, new MenuItem { Text = "Excel SpreadSheet" } };
245+
}
246+
247+
<ejs-ribbon id="ribbon">
248+
<e-ribbon-tabs>
249+
<e-ribbon-tab header="Insert">
250+
<e-ribbon-groups>
251+
<e-ribbon-group header="Tables">
252+
<e-ribbon-collections>
253+
<e-ribbon-collection>
254+
<e-ribbon-items>
255+
<e-ribbon-item type=DropDown>
256+
<e-ribbon-dropdownsettings iconCss="e-icons e-table" content="Table" items="tableOptions" createPopupOnClick=true></e-ribbon-dropdownsettings>
257+
</e-ribbon-item>
258+
</e-ribbon-items>
259+
</e-ribbon-collection>
260+
</e-ribbon-collections>
261+
</e-ribbon-group>
262+
</e-ribbon-groups>
263+
</e-ribbon-tab>
264+
</e-ribbon-tabs>
265+
</ejs-ribbon>
266+
267+
{% endhighlight %}
268+
{% endtabs %}
269+
233270
### Split button items
234271

235272
You can render the built-in splitButton Ribbon item by setting the [type](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Ribbon.RibbonItem.html#Syncfusion_EJ2_Ribbon_RibbonItem_Type) property to `SplitButton` you can render a splitButton item. You can also customize the SplitButton item through [RibbonSplitButtonSettings](https://help.syncfusion.com/cr/aspnetcore-js2/Syncfusion.EJ2.Ribbon.RibbonSplitButtonSettings.html#properties), which provides options such as `IconCss`, `Items`, `Target` and more.

0 commit comments

Comments
 (0)