|
无法伸缩
前台代码:
<dx:ASPxTreeList ID="treelist" runat="server" Width="100%" AutoGenerateColumns="False"
ClientInstanceName="treelist" KeyFieldName="TreeNoteCodeID"
ParentFieldName = "TreeNoteParentCodeID" OnCustomDataCallback="treelist_CustomDataCallback">
<Columns>
<dx:TreeListDataColumn FieldName="ID" Caption="ID" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</dx:TreeListDataColumn>
<dx:TreeListDataColumn FieldName="TreeNoteCodeName" Caption="指标结构" CellStyle-VerticalAlign="Middle">
<HeaderStyle HorizontalAlign="Center" />
</dx:TreeListDataColumn>
<dx:TreeListDataColumn FieldName="TreeNoteDescription" Caption="指标描述" >
<HeaderStyle HorizontalAlign="Center" />
</dx:TreeListDataColumn>
<dx:TreeListDataColumn FieldName="TreeNoteFZDep" Caption="指标负责部门" >
<HeaderStyle HorizontalAlign="Center" />
</dx:TreeListDataColumn>
<dx:TreeListDataColumn FieldName="FZR" Caption="负责人" >
<HeaderStyle HorizontalAlign="Center" />
</dx:TreeListDataColumn>
<dx:TreeListDataColumn FieldName="QZ" Caption="权重" >
<HeaderStyle HorizontalAlign="Center" />
</dx:TreeListDataColumn>
<dx:TreeListTextColumn Caption="操作" >
<HeaderStyle HorizontalAlign="Center" />
<DataCellTemplate>
<center>
<input type="button" id="btnSave" class="btnM" value="编辑"ID") %>)"/>
<input type="button" id="btnDel" class="btnM" value="删除"ID") %>,'<%# Eval("TreeNoteCodeName") %>')"/>
</center>
</DataCellTemplate>
</dx:TreeListTextColumn>
</Columns>
<%--<SettingsBehavior AllowFocusedNode="True" />--%>
<SettingsSelection Enabled="True"/>
<Border BorderStyle="Solid" />
</dx:ASPxTreeList>
后台代码:
protected void Page_Load(object sender, EventArgs e)
{
BindTreeList();
treelist.ExpandAll();
}
写了ExpandAll();就不能收缩。
不写ExpandAll();就不能打开加号。
|
|