Change Field Layout and Visibility in a List View field to change the layout and visibility in list view

This lesson will guide you through the steps needed to select columns displayed in the List View. For this purpose, the Contact List View will be used. At runtime, you can right-click a column header and activate the Column Chooser, then drag invisible columns from the Column Chooser window to the grid control. To set the default table layout, you need to customize it at design-time.

This lesson will guide you through the steps required to select the columns displayed in the list view. To do this, use the contact list view. At runtime, you can right-click the column header and activate the column selector, and then drag the column will not be visible from the window to select the column grid control. To set the default table layout, you need to be customized at design time.

 

Note Note
Before proceeding, take a moment to review the Place an Action in a Different Location lesson.

Before proceeding, please take a moment to review the "operation will be placed in different locations" course.

 

In a WinForms application, the customizations made using the Runtime Column Chooser are persisted in a Model.user.xafml file, located in the application folder by default. In an ASP.NET application, you may need to set the SaveListViewStateInCookies property of the Options node and the SaveStateInCookies property of the corresponding Views | <ListView> node to "true". This enables you to save the List View state between sessions in a user's browser cookies, allowing each end-user to customize the List View individually. The set of columns visible by default is generated based on rules described in the List View Column Generation article. Customizing the default column set may be required. To make required columns visible or invisible within the List View by default, use the Model Editor.

Customize WinForms application, the column selector uses run time will remain in default in the Applications folder Model.user.xafml file. SaveStateInCookies property in an ASP.NET application, you may need to set the node's "memory list" InCookies attributes and the corresponding view | <ListView> node "true". This allows you to save the state of the list view in the user's browser Cookie in between sessions, thus allowing each individual end user to customize the list view. Set of columns visible by default list view column generation generation rules described in the article based. You may need to customize the default set of columns. To make the desired column visible or not, using the model editor in the list view by default.

 

  • Invoke the Model Editor for the MySolution.Module project, and navigate to the Views | MySolution.Module.BusinessObjects | Contact_ListView | Columns node to invoke the Grid List Editor Designer. It will display the default structure of the List View. You can customize the default appearance of the List View by dragging, resizing and grouping the columns. Invoke the Customization window by right-clicking the table header and selecting Column Chooser.

  • Call MySolution module project model editor and navigate to the view | My Solution Module business object |.. Contact_ListView | column grid nodes to invoke the List Editor designer. It displays the default list view of the structure. You can drag, resize and customize the default grouping column list view appearance. By right-clicking the table heading and select "column selector" to invoke a custom window.

 

  • Tutorial_UIC_Lesson16_1
  • For example, customize the List View to display the following columns.

  • For example, a custom list view to display in the following.

    1. FullName Full name
    2. Position Location
    3. Department Department
    4. Email Email

 

  • Tutorial_UIC_Lesson16_1_2

  • Run the WinForms or ASP.NET application. See if the Contact List View looks like the following image.

  • Run WinForms or ASP.NET applications. View contact list view is similar to the figure.

 

  • Tutorial_UIC_Lesson16_2

    Tutorial_UIC_Lesson16_2_2

  • Tip Tip
    When the browser window shrinks, some columns become hidden and can be accessed using the "..." button (see IModelColumnWeb.AdaptivePriority).

    When the browser window is shrinking, some columns will become hidden, you can use the "..." "button to access (See IModelColumnWeb. Adaptive priority).

 

 If you previously customized the visibility of the Contact List View columns at runtime, the new set of visible columns will not be applied. To remove the previous customization in a WinForms application, click the Reset View Settings button. Alternatively, you can invoke the Runtime Model Editor (using the Tools | Edit Model menu item), right-click the Views | Contact_ListView node and select Reset Differences.

如果以前在运行时自定义了联系人列表视图列的可见性,则将不会应用新的可见列集。要删除 WinForms 应用程序中的先前自定义项,请单击"重置视图设置"按钮。或者,您可以调用运行时模型编辑器(使用工具 |编辑模型菜单项),右键单击视图 |Contact_ListView节点并选择"重置差异"。

  • ResetDifferencesOrViewSettings

 

You can see the changes made in the lesson in the Model Editor invoked for the Model.DesignedDiffs.xafml file located in the Main Demo | MainDemo.Module project. The MainDemo application is installed in %PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

您可以在为模型调用的模型编辑器中看到该课程所做的更改。主演示模块项目。主演示应用程序安装在%PUBLIC%\Documents\DevExpress Demos 19.2\Components\eXpressApp Framework\MainDemo by default. The ASP.NET version is available online at http://demos.devexpress.com/XAF/MainDemo/

.

Note 注意
Alternatively, you can customize column order and visibility by changing the value of the Index property of specific columns (Columns node's child nodes). Refer to the List View Columns Customization article to learn more.

Alternatively, you can change the value of a particular column (column node of the child node) Index property from column order and visibility. For more information, see a list view column custom article.

Tip Tip
You can arrange columns into logical groups (bands). For details, refer to the List View Bands Layout topic.

You can be arranged in columns to the logical group (band). For more information, see the layout List View band theme.

Guess you like

Origin www.cnblogs.com/foreachlife/p/Change-Field-Layout-and-Visibility-in-a-List-View.html