简体   繁体   中英

Custom Kendo Grid order with editable popup

Please see this JS Fiddle for clarification.

In the fiddle, I want the popup editor fields to be in the order they're currently in: ID, Name, Type, Quantity, Notes . But in the grid itself, I'd like: Quantity, Type, Name .

Is separating the grid and the popup editor's field ordering possible? Ideally without creating more complicated templates (this example is simple, but in my real-world app, I'm dealing with 20+ fields).

The order is the one that you define in columns section of the Grid definition so just change the order as in : http://jsfiddle.net/JPgjd/4/

columns: [
    {
        command: ["edit"],
        title: "&nbsp",
        width: "95px"
    },
    { field: "quantity", title: "Qty" },
    { field: "type", title: "Type" },
    { field: "id", title: "ID", hidden: true },
    { field: "name", title: "Name" },
    { field: "notes", title: "Notes", hidden: true }
]

Remember that the order also apply when editing so hidden fields are displayed in the order defined in columns (hidden in a column definition applies only to grid not to editing form).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM