lyub35
lyub35

Reputation: 300

ShieldUI Grid Column min width

Is there a property or a way to specify a minimum width for a column in a ShieldUI Grid?

$("#grid1").shieldGrid({
                dataSource: {
                    data: products,
                    sort: [ { path: "['Category']['CategoryName']", desc: true } ],
                    filter: { field: "ProductID", value: "1" }
                },
                rowHover: false,
                columns: [
                "ProductName",
                { field: "['Category']['CategoryName']", title: "CategoryName", format: "{0:c}", width: "330px" },
                { field: "UnitPrice", title: "Unit Price", format: "{0:c}", width: "130px" },
                { field: "UnitsInStock", title: "Units In Stock", width: "130px" },
                { field: "Discontinued", width: "130px" },
                {
                    buttons: [
                            {
                                cls: "mybuttonCssClass",
                                caption: "<span class='glyphicon glyphicon-remove'></span> Delete",
                                commandName: "details", // build in - edit, delete
                                click: function (rowIndex) {
                                    var grid = this;
                                    // custom actions ...
                                    console.log(grid.options);
                                    alert(rowIndex);
                                }
                            },
                        { commandName: "delete" } // delete, edit, expand
                    ]
                }
                ]
            });

Upvotes: 2

Views: 90

Answers (1)

Vladimir Georgiev
Vladimir Georgiev

Reputation: 1949

Yes, there is a minWidth property, described like this:

The minimum width which the column can take when user resize it. In order to use this property the resizing of the grid needs to be turned on.

Upvotes: 2

Related Questions