csharp #xaf #lisview #viewController
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp #xaf #lisview #viewController相关的知识,希望对你有一定的参考价值。
using System;
using DevExpress.ExpressApp;
using DevExpress.XtraGrid;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Columns;
namespace WinSolution.Module.Win {
public class ListViewController : ViewController {
public ListViewController() {
TargetViewType = ViewType.ListView;
}
protected override void OnActivated() {
base.OnActivated();
ObjectSpace.ObjectChanged += new EventHandler<ObjectChangedEventArgs>(ObjectSpace_ObjectChanged);
View.ControlsCreated += new EventHandler(View_ControlsCreated);
}
protected override void OnDeactivated() {
base.OnDeactivated();
ObjectSpace.ObjectChanged -= new EventHandler<ObjectChangedEventArgs>(ObjectSpace_ObjectChanged);
View.ControlsCreated -= new EventHandler(View_ControlsCreated);
}
GridView gridViewCore = null;
void View_ControlsCreated(object sender, EventArgs e) {
GridControl gridControl = (GridControl)((ListView)(View)).Editor.Control;
gridViewCore = (GridView)gridControl.FocusedView;
foreach (GridColumn column in gridViewCore.Columns) {
column.ColumnEdit.EditValueChanging += new DevExpress.XtraEditors.Controls.ChangingEventHandler(ColumnEdit_EditValueChanging);
column.ColumnEdit.EditValueChanged += new EventHandler(ColumnEdit_EditValueChanged);
}
}
void ColumnEdit_EditValueChanging(object sender, DevExpress.XtraEditors.Controls.ChangingEventArgs e) {
//0
}
void ColumnEdit_EditValueChanged(object sender, EventArgs e) {
//1
}
void ObjectSpace_ObjectChanged(object sender, ObjectChangedEventArgs e) {
//2
}
}
}
//https://www.devexpress.com/Support/Center/Question/Details/Q131143/how-to-handle-events-of-property-editor-s-controls-in-the-listview
以上是关于csharp #xaf #lisview #viewController的主要内容,如果未能解决你的问题,请参考以下文章
csharp #xaf #controller #ShowCustomStartupNavigationItemController
csharp #xaf #drawing
csharp #xaf #pictureedit #zooming
csharp FilteringCriterion #xaf
csharp CriteriaController #xaf
csharp filtrowanie po oddzialach #xaf