2011-11-14,联系人,界面,DEV GridControl部分属性的设置

联系人界面

 

 

3个数据表

分类组:

数据,存储过程生成的表

ALTER PROCEDURE [dbo].[contactGroup_PD]
	-- Add the parameters for the stored procedure here
	@groupType nvarchar(10)
	--<@Param2, sysname, @p2> <Datatype_For_Param2, , int> = <Default_Value_For_Param2, , 0>
AS
BEGIN

     SET NOCOUNT ON;
     select distinct groupId from contactGroup
     where groupType=@groupType or groupId='_全部'


 

表的设置

 // group_gridView
            // 
            this.group_gridView.Appearance.FocusedCell.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
            this.group_gridView.Appearance.FocusedCell.Options.UseBackColor = true;
            this.group_gridView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.colgroupId});
            this.group_gridView.GridControl = this.group_gridControl;
            this.group_gridView.Images = this.imageCollection32;//图片集
            this.group_gridView.Name = "group_gridView";
            this.group_gridView.OptionsBehavior.Editable = false;//不可编辑
            this.group_gridView.OptionsView.ShowColumnHeaders = false;//不显示列头
            this.group_gridView.OptionsView.ShowDetailButtons = false;//不显示子内容按钮
            this.group_gridView.OptionsView.ShowGroupPanel = false;//不显示分组
            this.group_gridView.OptionsView.ShowHorzLines = false;//不显示行分割线
            this.group_gridView.OptionsView.ShowIndicator = false;//不显示行头
            this.group_gridView.OptionsView.ShowVertLines = false;//不显示列分割线
            this.group_gridView.OptionsView.ShowViewCaption = true;//显示表标题
            this.group_gridView.RowHeight = 40;//设置行高
            this.group_gridView.ViewCaption = "分类组";//表标题
            // 


不同分类组的切换

//不同联系人分类组,填充不同数据,部分按钮功能改变
        
   private bool groupEditEnable = false; //联系人组编辑功能
   private string my_groupType;
private void contactGroup_radioGroup_SelectedIndexChanged(object sender, EventArgs e)
        {

            switch (this.contactGroup_radioGroup.SelectedIndex)
            {
                case 0:
                    my_groupType = "user";//自定义组
                    this.contactGroup_PDTableAdapter.Fill(this.dataSet.contactGroup_PD, my_groupType);
                    this.groupEditEnable = true;
                    //this.contactGroup_ribbonPageGroup.Visible = true;
                    this.group_barButtonItem.Enabled =groupEditEnable;
                    this.delGroup_barButtonItem.Enabled = groupEditEnable;
                    this.modifyGroup_barButtonItem.Enabled = groupEditEnable;
                    break;
                case 1:
                    my_groupType = "custom";//客户组
                    this.contactGroup_PDTableAdapter.Fill(this.dataSet.contactGroup_PD, my_groupType);
                    this.groupEditEnable = false;
                    //this.contactGroup_ribbonPageGroup.Visible = false;
                    this.group_barButtonItem.Enabled =groupEditEnable;
                    this.delGroup_barButtonItem.Enabled = groupEditEnable;
                    this.modifyGroup_barButtonItem.Enabled = groupEditEnable;
                    break;
            }

        }
 


//联系人列表

数据:试图View_contactGroup

表的设置

// personList_gridView
            // 
            this.personList_gridView.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.colcontactName,
            this.colcontactMP,
            this.colcontactEmail});
            this.personList_gridView.GridControl = this.personList_gridControl;
            this.personList_gridView.IndicatorWidth = 35;//行头的宽度,为了显示行号
            this.personList_gridView.Name = "personList_gridView";
            this.personList_gridView.OptionsBehavior.Editable = false;
            this.personList_gridView.OptionsView.ShowDetailButtons = false;
            this.personList_gridView.OptionsView.ShowGroupPanel = false;
            this.personList_gridView.OptionsView.ShowViewCaption = true;
            this.personList_gridView.ViewCaption = "联系人列表";


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值