Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8571279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:44:49+00:00 2026-06-11T18:44:49+00:00

May someone assist me with how to tie up my parameters from a combobox

  • 0

May someone assist me with how to tie up my parameters from a combobox to a parameter on one of my action’s in my controller. I am using DevExpress control suite and this is my code:

 [HttpPost]
 public ActionResult Filter(string filterCriteria)
 {
     ViewData.Model = Repository.GetReports(filterCriteria);
     return RedirectToAction("Index");
 }

And this is my view :

<div style="float:right;padding-bottom:20px;" >
@using (Html.BeginForm())
{
<table><tr><td>
Filter by Keyword:</td>
<td>
@Html.DevExpress().DropDownEdit(
    settings =>
    {
        settings.Name = "checkComboBox";
        settings.Width = 210;
        settings.Theme = Utils.CurrentTheme;
        settings.Properties.DropDownWindowStyle.BackColor = System.Drawing.Color.FromArgb(0xEDEDED);
        settings.Properties.ClientSideEvents.ValueChanged = "function(s, e) {e.customArgs[\"filterCriteria\"] = checkComboBox.Name.toString();}";

        settings.SetDropDownWindowTemplateContent(c =>
        {
            @Html.DevExpress().ListBox(
                listBoxSettings =>
                {
                    listBoxSettings.Name = "checkListBox";
                    listBoxSettings.SkinID = "CheckComboBoxListBox";
                    listBoxSettings.CallbackRouteValues = new { Controller = "Report", Action = "Filter" };
                    listBoxSettings.Theme = Utils.CurrentTheme;
                    listBoxSettings.ControlStyle.Border.BorderWidth = 2;
                    listBoxSettings.ControlStyle.BorderBottom.BorderWidth = 1;
                    listBoxSettings.ControlStyle.BorderBottom.BorderColor = System.Drawing.Color.FromArgb(0xDCDCDC);
                    listBoxSettings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
                    listBoxSettings.Height = 100;

                    listBoxSettings.Properties.SelectionMode = ListEditSelectionMode.CheckColumn;

                    listBoxSettings.Properties.ClientSideEvents.SelectedIndexChanged = "OnListBoxSelectionChanged";
                }
            ).BindList(Repository.GetKeywords())
            .Render();
            ViewContext.Writer.Write("<table style=\"width:100%\"><tr><td align=\"right\">");
            @Html.DevExpress().Button(
                buttonSettings =>
                {
                    buttonSettings.Name = "buttonClose";
                    buttonSettings.Text = "Close";
                    buttonSettings.Style.Add("float", "right");
                    buttonSettings.Theme = Utils.CurrentTheme;
                    buttonSettings.ClientSideEvents.Click = "function(s, e){ checkComboBox.HideDropDown(); }";
                }
            )
            .Render();
            ViewContext.Writer.Write("</td></tr></table>");
        });
        settings.Properties.EnableAnimation = true;
        settings.Properties.ClientSideEvents.TextChanged = "SynchronizeListBoxValues";
        settings.Properties.ClientSideEvents.DropDown = "SynchronizeListBoxValues";
    }
).GetHtml()
</td><td>
@Html.DevExpress().Button(
    settings =>
    {
        settings.Name = "btnApply";
        settings.ControlStyle.CssClass = "button";
        settings.Text = "Apply";
        settings.UseSubmitBehavior = true;
        settings.Theme = Utils.CurrentTheme;
        settings.Width = 80;
        settings.RouteValues = new { Controller = "Report", Action = "Filter" };
    }
).GetHtml()
</td><td>
@Html.DevExpress().Button(
    settings =>
    {
        settings.Name = "btnClear";
        settings.ControlStyle.CssClass = "button";
        settings.Text = "Clear";
        settings.ClientSideEvents.Click = "function(s, e){ ASPxClientEdit.ClearEditorsInContainer(); }";
        settings.Theme = Utils.CurrentTheme;
        settings.Width = 80;
    }
).GetHtml()
</td></tr></table>
}
</div>

I have basically a gridview on the bottom i would like to filter with a drop down list above it. I invoke the action by using a button to go filter my collection. In this example, i was just trying to pass back the name of the control, i.e.

settings.Properties.ClientSideEvents.ValueChanged = "function(s, e) {e.customArgs[\"filterCriteria\"] = checkComboBox.Name.toString();}";

just to see if I am able to pass back any value but this failed. Can someone please elaborate on a way to do this?Thank you,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:44:51+00:00Added an answer on June 11, 2026 at 6:44 pm

    From what I gather, you want to retrieve the multiple items selected within the “checkListBox” ListBox on the Controller side.
    If so, use the ListBoxExtension.GetSelectedValues method in the following manner:

    [HttpPost]
    public ActionResult Filter(string filterCriteria)
    {
        //listBoxSettings.Name = "checkListBox";
    
        string[] values = ListBoxExtension.GetSelectedValues<string>("checkListBox");
        filterCriteria = values...
    
        ViewData.Model = Repository.GetReports(filterCriteria);
        return RedirectToAction("Index");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder whether someone may be able to help me please. I'm using the
I wonder whether someone may be able to help me please. I'm using Aurigma
I've been banging my head against the wall with this one, may be someone
I am hoping that someone may have an idea on how to control/specify the
Been having real trouble with this one and wondered if someone may have found
I wonder whether someone may be able to help me please. I'm using this
may someone could help me on one problem in query LINQ to SQL Visual
I wonder whether someone may be able to help me please. Firstly apologies as
I wonder whether someone may be able to help me please Firstly, my apologies
I wonder whether someone may be able to help me please. Firstly, this is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.