• Using MultiColumn DropDowns [Janus GridEX WinForms Control v3.5 for .NET]

    The SupplierID field will have a GridEX dropdown to display the Suppliers' name to the user while the control internally works with the SupplierID value. The GridEXDropDown object is used also as the source list of a dropdown list when MultiColumnCombo or MultiColumnDropDown EditType is used.


    To have a MultiColumn DropDown in a column you must:



    1 - Add Suppliers table to JSNorthwindDataSet. To add a table to an existing DataSet, in the Data Sources window, click in the "Configure DataSet wizard button and check the table you want to add in the dialog that appears.



    2 - Build the application so you can see SuppliersTableAdapter component in the tool box.



    3 - Drag SuppliersTableAdapter component from the toolbox and drop it into the form.



    4 - In the GridEX Designer dialog:



    Select DropDowns node and click Add button

    In the MultiColumnConfiguration Wizard, Select JSNorthwindDataSet as DataSource and Suppliers as DataMember

    Click Next

    Check the column you want to show in the drop down (In this sample we selected SupplierID and CompanyName)

    Click Next

    Set Key = "Suppliers"

    Column = SupplierID

    ValueMember = "SupplierID"

    DisplayMember = "CompanyName"

    Click Finish





    5 - In the Columns Node of the GridEX control, select SupplierID Column.



    10 - Change the following properties in the column



    EditType = MultiColumnCombo

    CompareTarget = Text

    DefaultGroupInterval = Text



    11 - In the Load event of the Form, fill the Suppliers table using this code:



    SuppliersTableAdapter.Fill(JSNorthwindDataSet.Suppliers)





    12 - Set the DataSource and DataMember properties of the DropDown at run time. DropDown objects cannot keep the DataSource and DataMember properties you have used at design time to retrieve the column layout.

    For that reason, you need to reset those properties at runtime.



    In the Load event of Form1 write:



    In VB:



    GridEX1.DropDowns("Suppliers").SetDataBinding(JSNorthwindDataSet,"Suppliers")

    In C#:



    gridEX1.DropDowns["Suppliers"].SetDataBinding(jsNorthwindDataSet,"Suppliers");


    11 - Run the project

    Source Of Information : Janus v3.5 Help Files for VS 2008


1 comments:

  1. AQEEL AHMED says:

    i am using auto complete , and i want if user type any text in column dropdown show open , its not opening it self unless i click on down arrow button.

Leave a Reply