We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filtering DropDown type columns

Thread ID:

Created:

Updated:

Platform:

Replies:

123277 Mar 3,2016 08:40 AM UTC Mar 7,2016 09:38 AM UTC ASP.NET Web Forms 3
loading
Tags: Grid
Jorge Pampin
Asked On March 3, 2016 08:40 AM UTC

Hello,

The DropDown  edit columns cannot be filtered by the text, only by the value. I use Menu Filter mode.

Thanks!

Jayaprakash Kamaraj [Syncfusion]
Replied On March 4, 2016 05:32 AM UTC

Hi Jorge,

Please share the following and some more information to find the cause of the issue and provide a prompt solution

1.       Are you using foreign key column?

2.       Do you want to save dropdown text value while editing?

3.       Attach a screenshot of the issue.

4.       Do you want to filter the dropdown column based on text value?

5.       A sample if possible, or a sample hosted link.

6.       Client and server side codes of the sample.
Regards,
Jayaprakash K.


Jorge Pampin
Replied On March 4, 2016 09:11 AM UTC

Hello,

I want to filter the dropdown column based on text value. This is the code to load the columna data:

Column.EditType = Syncfusion.JavaScript.EditingType.Dropdown;
 List<SAVECommon.Entidades.EntCosteFijoVariable> Datos = new

 List<SAVECommon.Entidades.EntCosteFijoVariable>(); Column.DataSource = (IEnumerable)Datos;
Datos .Add(new SAVECommon.Entidades.EntCosteFijoVariable() {value='0', text = ''});
Datos .Add(new SAVECommon.Entidades.EntCosteFijoVariable() {value='1', text = 'Fijo'});
Datos .Add(new SAVECommon.Entidades.EntCosteFijoVariable() {value='2', text = 'Variable'});
 
Column.DataSource = (IEnumerable)Datos;
Column.DefaultValue = Datos[0].text;

Thanks!

Jayaprakash Kamaraj [Syncfusion]
Replied On March 7, 2016 09:38 AM UTC

Hi Jorge,
Query: I want to filter the dropdown column based on text value
We suggest you to use foreign key column to filter the dropdown column based on the text value. Data field and text can be set using foreignKeyField and foreignKeyValue properties of columns. Please refer to the following code example, Help documentation and sample.
Code Example:

<ej:Grid ID="Grid1"  AllowSorting="true" AllowPaging="True"

             AllowFiltering="True" 

                 AllowMultiSorting="false"

               runat="server">

            <Columns>

                <ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true"    TextAlign="Right" Width="90" />

                <ej:Column Field="CustomerID" HeaderText="Customer ID"   Width="100"  />

                <ej:Column Field="EmployeeID" HeaderText="Employee ID" ForeignKeyField="value"

                    ForeignKeyValue="text" EditType="Dropdown"  TextAlign="Right" Width="110"  />

                <ej:Column Field="Freight" HeaderText="Freight"  TextAlign="Right" Width="90" Format="{0:C}" />

                <ej:Column Field="OrderDate" HeaderText="Order Date" Width="100"  TextAlign="Right" Format="{0:MM/dd/yyyy}" />

                <ej:Column Field="ShipCity" HeaderText="Ship City" Width="100" />

            </Columns>

             <PageSettings PageSize="15" />

              <EditSettings AllowEditing="True" AllowAdding="True" AllowDeleting="True"></EditSettings>

                    <ToolbarSettings ShowToolbar="True" ToolbarItems="add,edit,delete,update,cancel"></ToolbarSettings>

           <FilterSettings FilterType="Menu"></FilterSettings>

        </ej:Grid>
    </div>


Help Documentation: http://help.syncfusion.com/aspnetmvc/grid/columns?cs-save-lang=1&cs-lang=razor#foreign-key-column
Sample: http://www.syncfusion.com/downloads/support/forum/123277/ze/SyncfusionASPNETApplication13181113996
Regards,
Jayaprakash K.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;