Having trouble getting help?
Contact Support
Contact Support
Searching
22 Mar 20181 minute to read
The Gantt control for JavaScript has in-built support for searching any content in Gantt.
Searching for content columns
In Gantt, we can search the content using the JavaScript method searchItem
with search key as parameter. Also, we can integrate the search text box in Gantt toolbar by adding search toolbar item in ToolbarSettings.ToolbarItems
property.
The following code example shows you how to add search option in Gantt toolbar.
@(Html.EJ().Gantt("GanttContainer")
//...
.ToolbarSettings(toolbar=>
{
toolbar.ShowToolbar(true);
toolbar.ToolbarItems(new List<GanttToolBarItems>(){
GanttToolBarItems.Search //To search the task
});
})
)
@(Html.EJ().ScriptManager())
The following screenshot shows the output of searching for string in Gantt control.