TreeGrid(ext.net)中的第一列始终居中,因此没有缩进。怎么修好了?

时间:2012-03-21 11:35:03

标签: ext.net treegrid

view of my TreeGrid

正如您在附图中看到的那样,我的树网格的第一列以某种方式居中对齐,我不知道如何修复它? 我网格的代码是

<ext:TreeGrid ID="TreeGrid1" runat="server" UseArrows="true" AutoScroll="true" Animate="true"
        EnableDD="true" ContainerScroll="true" Mode="Remote"  ContextMenuID="TreeContextMenu">
        <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <Items>
                    <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="Filter:" />
                    <ext:ToolbarSpacer />
                    <ext:TriggerField ID="TriggerField1" runat="server" EnableKeyEvents="true">
                        <Triggers>
                            <ext:FieldTrigger Icon="Clear" />
                        </Triggers>
                        <Listeners>
                            <KeyUp Fn="filterTree" Buffer="250" />
                            <TriggerClick Handler="clearFilter();" />
                        </Listeners>
                    </ext:TriggerField>
                </Items>
            </ext:Toolbar>
        </TopBar>
        <Columns>
            <ext:TreeGridColumn Header="Test" DataIndex="text" Width="600" />
            <ext:TreeGridColumn Header="Code" DataIndex="Code" Width="200" />
        </Columns>
        <Root>
            <ext:AsyncTreeNode NodeID="0" Text="Root" />
        </Root>
        <Listeners>
            <BeforeLoad Fn="nodeLoad" />
        </Listeners>
    </ext:TreeGrid>
</div>

<script type="text/javascript">

    var nodeLoad = function (node) {
        Ext.net.DirectMethods.NodeLoad(node.id, {
            success: function (result) {
                var data = eval("(" + result + ")");
                node.loadNodes(data);
            },

            failure: function (errorMsg) {
                Ext.Msg.alert('Failure', errorMsg);
            }
        });
    }

我使用默认的asp.net模板作为示例

0 个答案:

没有答案