您的位置:首页 > 其它

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

2011-11-14 14:04 323 查看
联系人界面



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 = "联系人列表";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: