向ExtJS Grid添加底部左右滚动条

时间:2010-10-14 18:59:01

标签: asp.net vb.net extjs

这是我的两个网格 - 它们是ExtJs网格,但我们在vb.net代码中包装声明:

Dim VehicleOptionsGrid As New Framework.WebControls.Grids.Grid
    With VehicleOptionsGrid
        .ID = "VehicleOptionsGrid"
        .Title = "Vehicle Options"
        .Toolbar.UseDefaultButtons = False        
        .Mode = Grids.Grid.GridMode.Control        
        .Panel.Border = False
        .Panel.Style = "border-width:1px;margin-bottom:5px"
        .Ref = "../../../../VehicleOptionsGrid"
        .Editable = True
        With .Columns.Add("IsSelected", "Selection", Framework.WebControls.Grids.Grid.ColumnDataType.Boolean)
            .Renderer = "renderVehicleCheckbox"
        End With
        .Columns.Add("CollateralId", "").Hidden = True
        .Columns.Add("OptionId", "OptionId").Hidden =True         
        .Columns.Add("OptionName", "Name").Width = 400
        .GridHeight = 400
        .DataBind()

        ViewResponse.AddScript(.ToString(False))
        ViewResponse.AddScript("VehicleOptionsGrid.grid.addListener('cellclick', changeOptionStatus);")
    End With

    Dim VehicleResultsGrid As New Framework.WebControls.Grids.Grid
    With VehicleResultsGrid
        .ID = "VehicleResultsGrid"
        .Title = "Results"
        .Toolbar.UseDefaultButtons = False
        .Mode = Grids.Grid.GridMode.Control
        .Panel.Border = False
        .Panel.Style = "border-width:1px;margin-bottom:5px"
        .Ref = "../../../../VehicleResultsGrid"        
        .Columns.Add("CollateralId", "").Hidden = True
        .Columns.Add("ValueType", "Value Type")
        .Columns.Add("ValueAmount", "Amount", Framework.WebControls.Grids.Grid.ColumnDataType.Money).Width = 400
        .GridHeight = 400
        .DataBind()

        ViewResponse.AddScript(.ToString(False))
    End With

使用javascript,无论如何我可以在这些网格中添加底部滚动条吗?似乎我们没有包装命令来做这件事......

1 个答案:

答案 0 :(得分:0)

回答,如果底部工具栏上有一个按钮,则只有解决方法是调整列的大小以便能够一起查看它们,或者启用列拖放。