[原] XAF 如何啟用ListView橫向滾動條
using System;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Win.Editors;
using DevExpress.Utils.Menu;
using DevExpress.XtraGrid.Menu;
using DevExpress.XtraGrid.Views.Grid; namespace CommonModule.Common.Controlers
{
public class ListViewFooterMenuViewController : ViewController
{
public ListViewFooterMenuViewController()
{
TargetViewType = ViewType.ListView;
} GridListEditor _listEditor;
protected override void OnViewControlsCreated()
{
base.OnViewControlsCreated(); _listEditor = ((ListView)View).Editor as GridListEditor;
if (_listEditor == null) return; _listEditor.GridView.PopupMenuShowing += GridView_PopupMenuShowing;
_listEditor.GridView.OptionsView.ColumnAutoWidth = false;//啟用滾動條
} void GridView_PopupMenuShowing(object sender, PopupMenuShowingEventArgs e)
{
if (e.MenuType != GridMenuType.Column) return; var menu = e.Menu as GridViewColumnMenu;
if (menu == null) return; string menuCaption;
if (_listEditor.GridView.OptionsView.ShowFooter)
menuCaption = "Hide Footer";
else
menuCaption = "Show Footer"; var item = new DXMenuCheckItem(menuCaption,_listEditor.GridView.OptionsView.ShowFooter, null, OnDrempelItemClick);
menu.Items.Add(item);
} private void OnDrempelItemClick(object sender, EventArgs e)
{
_listEditor.GridView.OptionsView.ShowFooter = !_listEditor.GridView.OptionsView.ShowFooter;
} protected override void OnDeactivated()
{ base.OnDeactivated();
if (_listEditor == null || _listEditor.GridView == null) return;
_listEditor.GridView.PopupMenuShowing -= GridView_PopupMenuShowing;
}
} }
[原] XAF 如何啟用ListView橫向滾動條的更多相关文章
- [原] XAF ListView 凍結列
using System; using System.ComponentModel; using System.Collections.Generic; using System.Diagnostic ...
- [原] XAF 如何启用ListView Top N records 提升用户使用体验
為了提升用戶使用體驗,特擴展此功能(來源與Xafari Framework).1.可在模型編輯器中設置是否啓用,默認啓用.2.DataAccessMode為Client模式才啓用.其它模式自動關閉.3 ...
- [原] XAF How to bind a stored procedure to a ListView in XAF
First, I suggest that you review the following topic to learn how to show a custom set of objects in ...
- [原] XAF ListView显示隐藏Footer菜单
using System; using DevExpress.ExpressApp; using DevExpress.ExpressApp.Win.Editors; using DevExpress ...
- [原] XAF How to Edit multiple objects in a ListViewAndDetailView
2014年好久没有更新Blog了,工作调换了,很少用XAF,但还是很关注XAF的发展和学习,对中国的中小企业数据管理软件开发真的太实用了!! 功能比较简单,但很实用,直接上图和代码! ListView ...
- [原] XAF 添加日期筛选下拉选择
1.ListView 添加日期筛选下拉选择,选择指定,可指定日期范围 2.Code using DevExpress.Data.Filtering; using DevExpress.ExpressA ...
- [原] XAF 如何将数据库中Byte array图片显示出来
问题比较简单,直接上代码. private Image _Cover; [Size(SizeAttribute.Unlimited), ValueConverter(typeof(ImageValue ...
- [原] XAF 如何基于业务规则禁用属性
How to: Disable Property Editors Based on a Business Rule // Developer Express Code Central Example: ...
- [原] XAF How can I change XafDisplayNameAttribute dynamically
void ViewControlsCreated(object sender, EventArgs e) { foreach (StringPropertyEditor item in view.Ge ...
随机推荐
- java--UDP屏幕广播代码
1.发送端的代码 这里广播的地址只写了一个 package com.udp.broadcast; import java.awt.Robot; import java.awt.image.Buffer ...
- JSON Object(如NSDictionary,NSArray)转化为JSON格式的NSString #iOS开发
NSString *string = [self jsonObjectToJSONString:inputDataDic]; -(NSString*)jsonObjectToJSONString:(i ...
- Eclipse安装部署(配图解)
Eclipse安装部署 前提:已经成功搭建配置JDK 下载 eclipse, 下载地址: http://www.eclipse.org/downloads/ 解压缩安装包(注意安装路径中不可以有空格) ...
- 将搜狗词库.scel格式转化为.txt格式
由于项目中要用到词库,而下载的搜狗词库是.scel格式,所以就用python脚本将搜狗词库.scel格式文件转化为.txt格式文件. #!/bin/python # -*- coding: utf-8 ...
- 选择c3p0作为连接池
<hibernate-configuration> <session-factory> <property name="dialect& ...
- JS execCommand 方法
document.execCommand()方法处理Html数据时常用语法格式如下: 复制内容到剪贴板 代码: document.execCommand(sCommand[,交互方式, 动态参数]) ...
- DBlink与同义词
DBLink就是数据库链接,而同义词就已经具体到某个用户下的表了 原文链接:http://www.linuxidc.com/Linux/2013-01/77579.htm 这里所需要的信息: 从MM库 ...
- linux下查看cpu物理个数、核数、逻辑cpu数
一.首先要明确物理cpu个数.核数.逻辑cpu数的概念 1.物理cpu数:主板上实际插入的cpu数量,可以数不重复的 physical id 有几个(physical id) 2.cpu核数:单块CP ...
- MVC中使用EF:排序,过滤,分页
原文链接:http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-paging ...
- boot from volume
nova boot --flavor 1 --block-device source=image,id=<image_id>,dest=volume,size=5,shutdown=pre ...