Grid filter submenu expanded by default on columnmenu

0 Answers 32 Views
Filter Grid Menu
Becky
Top achievements
Rank 1
Becky asked on 05 Apr 2022, 01:49 PM

Hi

I have a kendo grid and have turned on the column menu and the filtering. However, when the user opens the column menu, they then have to click again to open up the filtering. Is there a way to have this expanded by default? I have found some documentation that seems to show that functionality for the Angular side of kendo, but can't find anything for the MVC helpers, or the Jquery.

My grid currently looks like this.


@(Html.Kendo().Grid<HomeGridViewModel>().Name("WorkRequestGrid").Columns(x =>
{
	x.Bound(c => c.Priority).ClientTemplate("#=Priority#").Title("").Filterable(false).HtmlAttributes(new { @class = "crm_grid_priority" }).Width(20).Sticky();
	x.Bound(c => c.ActivityRef).ClientTemplate("<span>#=ActivityRef#</span>").Title("Activity Ref").HtmlAttributes(new { @class = "crm_grid_activity wordWrap" }).Width(135).Sticky();
	x.Bound(c => c.CustomerName).Title("Customer").HtmlAttributes(new { @class = "crm_customerName" }).Width(200);
	x.Bound(c => c.ProposerName).Title("Proposer Name").HtmlAttributes(new { @class = "crm_proposerName" }).Width(200);
	x.Bound(c => c.PostCode).Title("Postcode").HtmlAttributes(new { @class = "crm_postCode" }).Width(80);
	x.Bound(c => c.RequestDueDate).Format("{0:d}").Title("Client Due Date").HtmlAttributes(new { @class = "crm_dueDate" }).Visible(true).Width(100);
	x.Bound(c => c.SurveyType).Title("Survey Name").HtmlAttributes(new { @class = "crm_activityType" }).Width(200);
	x.Bound(c => c.SurveyorName).Title("Surveyor Name").HtmlAttributes(new { @class = "crm_surveyor" }).Width(200);
	x.Bound(c => c.ScheduledDate).Title("Booked date").Format("{0:d}").Visible(true).HtmlAttributes(new { @class = "crm_bookedDate" }).Width(100); 
	x.Bound(c => c.ItemStatus).Title("Status").HtmlAttributes(new { @class = "crm_status" }).Encoded(false).Sortable(false).Filterable(false).Width(200).Sticky();
})
	.HtmlAttributes(new { @class = "crm_grid" })
	.Sortable()
	.Filterable(f=>f.Enabled(true).Extra(false).Operators(Model.GridOperators))
	.ColumnMenu(m=> {
		m.ComponentType("modern");
		m.Columns(c =>
		{
			c.Sort("asc")
			.Groups(g =>
			{
				g.Add().Title("Survey Details").Columns(new List<string> { "ActivityRef", "SurveyType", "RequestDueDate", "SurveyorDueDate", "SurveyorName", "ScheduledDate"});
				g.Add().Title("Property Details").Columns(new List<string> { "CustomerName", "ProposerName", "PostCode" });
				g.Add().Title("Survey Status").Columns(new List<string> { "SurveyStatus" });
			});
		});
	})
	.Resizable(r=>r.Columns(true))
	.ColumnResizeHandleWidth(3)
	.Mobile(MobileMode.Auto)
	.Scrollable(s=>s.Height("400px"))
	.Pageable(p => p.Enabled(true).PageSizes(new int[] { 20, 50, 100,250 }))
	.DataSource(d => d
		 .Ajax()
		 .Read(read => read.Action("Grid_HomePage", "Home"))
		 .PageSize(50)
		 .ServerOperation(true)
	)
)

 

If anyone has any pointers or can help with this, I'd greatly appreciate it.

 
Thanks

 

No answers yet. Maybe you can help?

Tags
Filter Grid Menu
Asked by
Becky
Top achievements
Rank 1
Share this question
or