Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #109060


    I am trying to recreate this

    columns: [
    		label: 'First Name', dataField: 'firstName', editor: 'input'
    	{ label: 'Last Name', dataField: 'lastName', editor: 'autoComplete' },
    		label: 'Product', dataField: 'productName', template: 'dropDownList', editor: {
    			template: 'dropDownList',
    			dataSource: ["Black Tea", "Green Tea",
    				"Caffe Espresso", "Doubleshot Espresso",
    				"Caffe Latte", "White Chocolate Mocha",
    				"Caramel Latte", "Caffe Americano",
    				"Cappuccino", "Espresso Truffle",
    				"Espresso con Panna", "Peppermint Mocha Twist"]

    which I found here:
    in C#, but I can’t figure it out. This is what I have so far.

    new GridColumn()
                            DataField = field.FieldName,
                            Label = field.AliasName,
                            ColumnGroup = field.GroupName,
                            ValidationRules = field.DataType.ValidationRules,
                            DataType = field.DataType.GetSmartType(),
                            CellsClassName = "font-change",
                            ClassName = "ColumnHeaderName",
                            Template = "dropdownlist",
                            Editor = "dropDownist"

    Thank you.

    • This topic was modified 7 months, 3 weeks ago by FerrisChamp.

    Hi FerrisChamp,


    Here is an example of a GridColumn object with a dropDownList editor and custom dataSource:

    new GridColumn()
    DataField = “Product”,
    Label = “Product Name”,
    Template = “dropDownList”,
    Editor = new Dictionary<string, object>()
    {“template”, “dropDownList” },
    {“dataSource”, new string[] {“Black Tea”, “Green Tea”,
    “Caffe Espresso”, “Doubleshot Espresso”,
    “Caffe Latte”, “White Chocolate Mocha”,
    “Caramel Latte”, “Caffe Americano”,
    “Cappuccino”, “Espresso Truffle”,
    “Espresso con Panna”, “Peppermint Mocha Twist”} },


    Best Regards,
    Ivan Peevski
    Smart UI Team


    Thank you! This solved my problem!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.