Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize the Operation in Dev WPF Interface Development

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to realize the operation in the development of Dev WPF interface, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

With DevExpress WPF Controls, you can create powerful interactive XAML foundation applications that focus on the needs of contemporary customers and build a new generation of touch-enabled solutions in the future.

System background

Platform: WPF

Product: DXGrid for WPF

This article demonstrates how to use WcfInstantFeedbackDataSource or WcfServerModeDataSource with DXGrid, and how to implement CRUD operations in your application through special behavior (for example, add, delete, edit).

This test requires the SQL Express service to be installed on your computer.

We created WCFServerModeCRUDBehavior and WCFInstantModeCRUDBehavior additional operations for GridControl, such as:

The WCFServerModeCRUDBehavior and WCFInstantModeCRUDBehavior classes contain NewRowForm and EditRowForm properties to provide "Add Row" and "EditRow" operations. Using these properties, you can create add and edit forms as needed:

This action class requires the following information in your data model:

EntityObjectType-Type of row

Objects of type DataServiceContext-DataServiceContext

PropertiesList-list of table column

PrimaryKey-the primary key of the database table

An object of type DataSource-WcfInstantFeedbackDataSource or WcfServerModeDataSource.

Helper.PropertiesList.Add ("Id"); helper.PropertiesList.Add ("Name")

See the WcfInstantFeedbackDataSource and WcfServerModeDataSource classes for more information about WcfInstantFeedbackDataSource and WcfServerModeDataSource.

Descendants of action classes support the following commands: NewRowCommand, RemoveRowCommand, EditRowCommand, to which you can easily bind interactive controls. For example:

Add Remove Edit

By default, WCFServerModeCRUDBehavior and WCFInstantModeCRUDBehavior solutions support the following end-user interaction features:

The end user can edit the selected row value by double-clicking the grid row or pressing the Enter key if the AllowKeyDownActions attribute is True.

If the AllowKeyDownActions property is True, the end user can delete the selected row with the delete key.

End users can add, delete, and edit new lines through the NewRowCommand, RemoveRowCommand, and EditRowCommand commands.

This is the answer to the question about how to realize the operation in the development of Dev WPF interface. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report