我正在使用DevExpress的aspxtreelist,并且在保存客户端布局时遇到问题:
AspxTreeList.SaveClientLayout((;
我让网格视图和数据透视网格的SaveClientLayout工作,但是每当我调用树列表的SaveClientLayout时,它都会返回相同的内容。
用于保存布局的代码:(在按钮单击中尝试(
byte[] byte123 = tree.SaveClientLayout();
string layoutstring = Convert.ToBase64String(tree.SaveClientLayout());
布局字符串:
AgAHAAcABwAG//8G//8G8P8CAVo=
我的树形列表代码:
<dx:ASPxTreeList ID="ASPxTreeList1" runat="server" AutoGenerateColumns="False" ClientInstanceName="treeTo" DataSourceID="SqlDataSource" KeyFieldName="ID" ParentFieldName="PID" OnCustomCallback="ASPxTreeList1_CustomCallback" EnableTheming="True" Theme="Metropolis" OnClientLayout="ASPxTreeList1_ClientLayout">
<Columns>
<dx:TreeListTextColumn FieldName="ParentID" ShowInCustomizationForm="True" VisibleIndex="2">
</dx:TreeListTextColumn>
<dx:TreeListTextColumn FieldName="Text" ShowInCustomizationForm="True" VisibleIndex="3">
</dx:TreeListTextColumn>
<dx:TreeListTextColumn FieldName="NavigateURL" ShowInCustomizationForm="True" VisibleIndex="4">
</dx:TreeListTextColumn>
<dx:TreeListCommandColumn VisibleIndex="1">
<EditButton Visible="True">
</EditButton>
<NewButton Visible="True">
</NewButton>
<DeleteButton Visible="True">
</DeleteButton>
</dx:TreeListCommandColumn>
</Columns>
<Styles>
<Header CssClass="droppableRight"></Header>
<Node CssClass="droppableRight"></Node>
<AlternatingNode Enabled="True" CssClass="droppableRight">
</AlternatingNode>
</Styles>
<SettingsBehavior AutoExpandAllNodes="True" AllowFocusedNode="True" />
<SettingsPager AlwaysShowPager="True" Mode="ShowPager" PageSize="25">
<AllButton Visible="True">
</AllButton>
</SettingsPager>
<SettingsEditing AllowNodeDragDrop="True" />
</dx:ASPxTreeList>
为什么 SaveClientLayout 总是返回相同的布局字符串?它非常适合网格视图和数据透视网格
原来树列表需要启用 cookie。启用饼干有效