z怎样设置dx:wpf grid zindexcontr0l的台头

3418人阅读
DevExpress(5)
<span style="color:#、DXperience ASPxGridView如何开启lightweight模式
描述:ASPxGridView样式主题中page render mode选项里面有 lightweight模式,要如何开启此模式?
解答:目前ASPxGridView控件本身不支持Lightweight模式,目前支持的控件包括:ASPxMenu ASPxNavBar,ASPxPager,ASPxPageControl,ASPxPopupControl,ASPxPopupMenu,ASPxTabControl。
<span style="color:#、GridControl的数据和数据源打印之后不同步
描述:frmTest、gridcontrol1、gridview1、dtView、dtview为 gridcontrol1的数据源。数据源是根据dtview按照一定规则重新生成的 datatable,xtrareport.showpreviewdialog()打印之后frmtest的数据是没有清空的,gridview可以继续编辑和打印报表。问题就是:打印一次之后gridview可以再次编辑,但是绑定的数据源dtview就一直和打印之前是一样的效果,也就是 gridcontrol的数据和数据源不同步了。
解答:GridControl是不支持自动保存数据到数据库的,所以请使用GridView.RowUpdated 事件,并通过代码将更改的数据保存到数据源。
<span style="color:#、Dxperience PivotGridControl设置的数据类型不为空
描述:我赋&#20540;给PivotGridControl.DataSource的dataset中某列的数据类型是可以为空的decimal,其中有些行是null,即使使用EmptyCellText=&&显示仍然是0.00,而我要的结果是空。
解答:EmptyCellText是指当指定单元&#26684;对应的底层数据源中不包含数据,那么当前单元&#26684;就不显示任何内容,这时可通过该属性设置其显示文本,而如果您的示例中指定单元&#26684;底层数据源中有数据,但只是数据为0时,使用该属性是不起作用。
建议您使用PivotGridControl.CustomCellDisplayText事件来自定义当数据为0时的显示文本。
<span style="color:#、DXperience PivotGridField自定义&#26684;式化方法
描述:如果PivotGridField中的&#20540;为等数字,有没有自定义&#26684;式化的方法将等&#26684;式化为:
2011(万吨),2012(万吨)
解答:您可以通过设置PivotGridField.CellFormat来实现该功能,参考代码如下:
&dxpg:PivotGridField Name=&fieldQuantity&FieldName=&Quantity&Area=&DataArea&CellFormat=&{0}(万吨)&/&
<span style="color:#、DevExpress GridView选中行字体加粗问题
描述:GridView外面有一个按钮,当我选中一行后,点击按钮,那行的字体加粗加黑,怎么实现?
解答:GridView选中行字体加粗,建议您使用以下代码实现:
Font font =
new System.Drawing.Font(&&, 10, FontStyle.Regular);
gridView1.Appearance.FocusedRow.Font =&&&
<span style="color:#、DevExpress Gridview中有一列是删除链接按钮,怎么变为普通button样式
描述:代码如下
&dx:GridViewCommandColumn VisibleIndex=&7&&
&&&&&&&&&EditButton Visible=&True&&Text=&编辑&&
&&&&&&&&&/EditButton&
&&&&&&&&&DeleteButton Visible=&True&Text=&删除&&
&&&&&&&&&/DeleteButton&
&&&&&&&&&ClearFilterButton Visible=&True&&
&&&&&&&&&/ClearFilterButton&
&/dx:GridViewCommandColumn&
解答:要将GridView删除按钮改为普通button样式,可通过GridViewCommandColumn.ButtonType 属性进行设置。
<span style="color:#、DXperience多线程下访问XtraGrid实例安全吗
描述:DXperience多线程可以安全地访问同一个XtraGrid的实例吗?此外,如果XtraGrid的多个实例被用于多个线程,有什么线程安全问题要注意的吗?
解答:DXperience可视控件只有三个方法是线程安全的:CreateGraphics,Invoke和BeginInvoke。XtraGrid的方法应通过BeginInvoke调用其他的线程。
应用程序可以在不同线程的XtraGrid创建多个实例形式。在这种情况下不应该有任何问题:网&#26684;控件在不同的线程形式下正确访问共享资源。
这样子总是不显示是否选中。
解答:设置PropertiesCheckEdit-ValueChecked=&Y& PropertiesCheckEdit-ValueUnchecked=&N&
<span style="color:#、如何在DXperience DXPivotGrid控件上增加一列百分比
描述:我想在DXPivotGrid中新增加一列XX率,是第一列和第二列的百分比,在帮助上只是找见这个PivotGridControl.ShowFieldList方法,可是还不会使用。
解答:ShowFieldList/HideFieldList 是用来显示“字段选择面板”的。&br/&关于您的所描述的&自定义计算成员&的问题您可以通过 Unbound Field 来实现,参考链接:
不过遗憾的是,OLAP 模式下无法使用该方式,因此在该模式下,您需要在 OLAP 服务器端定义自定义计算成员。
<span style="color:#、DXperience XtraGrid如何清除网&#26684;
描述:XtraGrid网&#26684;中显示了数据,在某一时刻,我需要清除网&#26684;,如何实现?
解答:你应该设置GridControl.DataSource属性为null,并调用Columns.Clear()方法阻止网&#26684;主视图。
gridControl1.DataSource =null;
gridView1.Columns.Clear();
如果需要恢复原来的网&#26684;视图,你可以动态地创建一个临时的空GridView,并将它分配给GridControl。
DevExpress.XtraGrid.Views.G
ds = gridControl1.DataS
gridControl1.DataSource =null;
GridView view =
new GridView(gridControl1);
view.OptionsView.ShowGroupPanel =false;
view.OptionsView.ShowColumnHeaders =false;
gridControl1.MainView =
gridControl1.MainView = gridView1;
gridControl1.DataSource =
<span style="color:#、如何绑定Devexpress Gridview的checkbox列中的数据源
描述:在Gridview添加了GridViewDataCheckColumn列,然后绑定了数据源,对应的字段 Locked,该字段在数据库中存的是string类型的&#20540;,如&Y&,&N&,我想页面根据这个&#20540;来显示checkbox的选中情况,如“Y”表示选中,“N”就不选中,怎么实现?
我的前台代码是:
&dx:GridViewDataCheckColumn FieldName=&Locked&VisibleIndex=&3&Caption=&已锁定&&&PropertiesCheckEdit-DisplayTextChecked=&是&PropertiesCheckEdit-DisplayTextUnchecked=&否&&
&/dx:GridViewDataCheckColumn&
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:233503次
积分:2716
积分:2716
排名:第12816名
原创:36篇
转载:85篇
评论:16条
(1)(1)(1)(1)(1)(4)(2)(3)(1)(1)(3)(2)(1)(6)(4)(16)(4)(3)(4)(3)(1)(1)(4)(3)(2)(6)(3)(2)(15)(1)(3)(4)(14)7257人阅读
一、 ComboBoxEdit
1、 如何使其不可编辑
TextEditStyle 设置为:DisableTextEditor
2、 如何设置鼠标为手形
Cursor 设置为:Hand
二、 GridControl
1、 如何解决单击记录整行选中的问题
View-&OptionsBehavior-&EditorShowMode 设置为:Click
2、 如何新增一条记录
(1)、gridView.AddNewRow()
(2)、实现gridView_InitNewRow事件
3、如何解决GridControl记录能获取而没有显示出来的问题
gridView.populateColumns();
4、如何让行只能选择而不能编辑(或编辑某一单元格)
(1)、View-&OptionsBehavior-&EditorShowMode 设置为:Click
(2)、View-&OptionsBehavior-&Editable 设置为:false
5、如何禁用GridControl中单击列弹出右键菜单
设置Run Design-&OptionsMenu-&EnableColumnMenu 设置为:false
6、如何隐藏GridControl的GroupPanel表头
设置Run Design-&OptionsView-&ShowGroupPanel 设置为:false
7、如何禁用GridControl中列头的过滤器
过滤器如下图所示:
设置 Run Design-&OptionsCustomization-&AllowFilter 设置为:false
8、如何在查询得到0条记录时显示自定义的字符提示/显示
如图所示:
方法如下:
//When no Records Are Being Displayed
private void gridView1_CustomDrawEmptyForeground(object sender, CustomDrawEventArgs e)
//方法一(此方法为GridView设置了数据源绑定时,可用)
ColumnView columnView = sender as ColumnV
BindingSource bindingSource = this.gridView1.DataSource as BindingS
if(bindingSource.Count == 0)
string str = &没有查询到你所想要的数据!&;
Font f = new Font(&宋体&, 10, FontStyle.Bold);
Rectangle r = new Rectangle(e.Bounds.Top + 5, e.Bounds.Left + 5, e.Bounds.Right - 5, e.Bounds.Height - 5);
e.Graphics.DrawString(str, f, Brushes.Black, r);
//方法二(此方法为GridView没有设置数据源绑定时,使用,一般使用此种方法)
if (this._flag)
if (this.gridView1.RowCount == 0)
string str = &没有查询到你所想要的数据!&;
Font f = new Font(&宋体&, 10, FontStyle.Bold);
Rectangle r = new Rectangle(e.Bounds.Left + 5, e.Bounds.Top + 5, e.Bounds.Width - 5, e.Bounds.Height - 5);
e.Graphics.DrawString(str, f, Brushes.Black, r);
9、如何显示水平滚动条?
设置this.gridView.OptionsView.ColumnAutoWidth =
10、如何定位到第一条数据/记录?
设置 this.gridView.MoveFirst()
11、如何定位到下一条数据/记录?
设置 this.gridView.MoveNext()
12、如何定位到最后一条数据/记录?
设置 this.gridView.MoveLast()
13、设置成一次选择一行,并且不能被编辑
this.gridView1.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowF
this.gridView1.OptionsBehavior.Editable =
this.gridView1.OptionsSelection.EnableAppearanceFocusedCell =
14、如何显示行号?
this.gridView1.IndicatorWidth = 40;
//显示行的序号
private void gridView1_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
if (e.Info.IsRowIndicator && e.RowHandle&=0)
e.Info.DisplayText = (e.RowHandle + 1).ToString();
15、如何让各列头禁止移动?
设置gridView1.OptionsCustomization.AllowColumnMoving =
16、如何让各列头禁止排序?
设置gridView1.OptionsCustomization.AllowSort =
17、如何禁止各列头改变列宽?
设置gridView1.OptionsCustomization.AllowColumnResizing =
三、navBarControl
1、如何在每一个navBarGroup里添加自己想要的控件
设置GroupStyle: ControlContainer
2、如何设置navBarGroup有滚动条
设置SkinExplorerBarViewScrollStyle:ScrollBar
3、 如休把navBarGroup设置成如下样式
如图所示:
设置navBarGroup的PaintStyleName属性为: SkinNavigationPane
四、toolTipController
效果图如下:
1、如何设置显示的时间长短
设置this.toolTipController1.AutoPopDelay = 2000;
2、如何在屏幕上显示如上图所示的效果
ToolTipControllerShowEventArgs args = this.toolTipController1.CreateShowArgs();
this.toolTipController1.SetToolTip(this.sbtnYes, &请选择一条记录!&);
this.toolTipController1.SetTitle(this.sbtnYes, &提示&);
this.toolTipController1.SetToolTipIconType(this.sbtnYes, DevExpress.Utils.ToolTipIconType.Exclamation);
this.toolTipController1.ShowBeak =
this.toolTipController1.ShowShadow =
this.toolTipController1.Rounded =
this.toolTipController1.ShowHint(&请选择一条记录!&, &提示&);
args.ToolTip = &请选择一条记录!&;
args.Title = &提示&;
3、如何设置边框的颜色
this.toolTipController1.Appearance.BorderColor = Color.R
五、TextEdit
1、如何设置TextEdit为多行,可拉伸
设置TextEdit的Propertity-&AutoHeight为:False
六、LayoutControl
1、如何设置LayoutItem为隐藏
设置LayoutItem.Visibility
七、TreeList
1、如何隐藏TreeList的列头
设置TreeListr的OptionsView的ShowColumns属性为:False
八、PictureEdit
1、如何禁止PictureEdit的右键菜单?
设置PictureEdit的Properties-&ShowMenu为:false
九、TreeList
1、 如何让TreeList的每个结点高亮显示?
效果如下:
代码如下:
private void treeList1_CustomDrawNodeCell(object sender, DevExpress.XtraTreeList.CustomDrawNodeCellEventArgs e)
TreeList node = sender as TreeL
if (e.Node == node.FocusedNode)
e.Graphics.FillRectangle(SystemBrushes.Window, e.Bounds);
Rectangle r = new Rectangle(e.EditViewInfo.ContentRect.Left,
e.EditViewInfo.ContentRect.Top,
Convert.ToInt32(e.Graphics.MeasureString(e.CellText,
treeList1.Font).Width + 1),
Convert.ToInt32(e.Graphics.MeasureString(e.CellText,treeList1.Font).Height));
e.Graphics.FillRectangle(SystemBrushes.Highlight, r);
e.Graphics.DrawString(e.CellText, treeList1.Font, SystemBrushes.HighlightText, r);
e.Handled =
//============================================================================
//===============================以下内容为收集===============================
//============================================================================
一、改变grid的样式。
DevExpress.XtraGrid.Design.XA
xapp=new DevExpress.XtraGrid.Design.XAppearances(System.Environment.GetFolderPath(System.Environment.SpecialFolder.System) + &\\DevExpress.XtraGrid.Appearances.xml &);
xapp.LoadScheme(“样式名字”, gridControl1.MainView);
二、选择单元设置和取所选的值
gridView1.OptionsSelection.MultiSelect = ceMultiSelect.C //多行选择
gridView1.OptionsSelection.MultiSelectMode= GridMultiSelectMode.CellS
gridView1.OptionsSelection.MultiSelectMode= GridMultiSelectMode. RowS //
三、gridview的控制
///&取当前选中的值&
string GetSelectedRows(GridView view) {
string ret = &&;
int rowIndex = -1;
if(view.OptionsSelection.MultiSelectMode == GridMultiSelectMode.RowSelect) {
foreach(int i in gridView1.GetSelectedRows()) {
DataRow row = gridView1.GetDataRow(i);
if(ret != &&) ret += &\r\n&;
ret += string.Format(&Company Name: {0} (#{1})&, row[&CompanyName&], i);
foreach(GridCell cell in view.GetSelectedCells()) {
if(rowIndex != cell.RowHandle) {
if(ret != &&) ret += &\r\n&;
ret += string.Format(&Row: #{0}&, cell.RowHandle);
ret += &\r\n
& + view.GetRowCellDisplayText(cell.RowHandle, cell.Column);
rowIndex = cell.RowH
///&设置选中的颜色&//半透明的效果
private void icbTranslucentColors_CheckedChanged(object sender, System.EventArgs e) {
if(icbTranslucentColors.Checked) {
gridView1.Appearance.SelectedRow.BackColor = Color.FromArgb(30, 0, 0, 240);
gridView1.Appearance.FocusedRow.BackColor = Color.FromArgb(60, 0, 0, 240);
gridView1.Appearance.SelectedRow.Reset();
gridView1.Appearance.FocusedRow.Reset();
///&自动添加一行&
gridView1.OptionsView.NewItemRowPosition =
NewItemRowPosition.Bottom//Top/N
///&设置gridView的按钮&
gridView1.ShowButtonMode = ShowButtonModeEnum.。。。。。。
gridView1.OptionsBehavior.Editable = chEdit.C //设置按钮是否可用
///向选中的空间输入字符串
SendKeys.Send(“fsfds”);
///控件焦点
gridControl1.Focus();
四、cardView的设置
///是否现实快捷按钮CustomizeButton
cardView1.OptionsView.ShowQuickCustomizeButton=true/
///设置CustomizeButton的能否排序和过滤
foreach(GridColumn col in cardView1.Columns)
col.OptionsColumn.AllowSort}
foreach(GridColumn col in cardView1.Columns)
col.OptionsFilter.AllowFilter}
///card的头上的ico显示
cardView1.LayoutChanged();
///card的头上的标题改变显示
cardView1.CardCaptionFormat =””;
///cardview显示的单个记录的折叠按钮
cardView1.OptionsView.ShowCardExpandButton=
cardView1.MaximumCardColumns =iSize
cardView1.MaximumCardRows =
cardView1.OptionsBehavior.AutoHorzWidth
cardView1.OptionsSelection.MultiSelect = ceMultiSelect.C
foreach(int i in cardView1.GetSelectedRows()) {
DataRow row = cardView1.GetDataRow(i);
if(ret != &&) ret += &\r\n&;
ret += string.Format(&{0} / {1} : {2:$#,0.00}&, row[&Trademark&], row[&Model&], row[&Price&]);
}///查看选择中的记录
CellMerging(单元格合并的效果)
CellMerging(单元格合并的效果)
gridView1.OptionsView.AllowCellMerge = ceMerging.C
Fixed Bands(bandedGridView)
///两边固定
gridBand3 的一列的Fixed属性改成 Right,Left,None
///固定与非固定列之间的距离用
bandedGridView2.FixedLineWidth = (int)numFixedLineWidth.V
///设置列的颜色
l 打开Run Designer 选中Columns 选中要改变的列 里面有AppearanceCell (设置列的外观)和 AppearanceHeader(设置表格头的外观)
l 或者选中该列查看“属性”里面也有这两个属性。
///统计 (gridView bandedGridView通用)
分组统计和全部统计:
全部统计:在最下面显示统计的结果。
Run Designer-&Total Summary //-&General 设置显示
//-&Columns 对特定列来设置统计
汇总结果是否显示:可以通过gridControl的view的ShowFooter属性来设置表格下面的汇总结果
分组统计:
以上就是“分组”的 显示在每个分组下面来显示汇总结果。
通过bandedGridView2.GroupFooterShowMode= GroupFooterShowMode.。。。。设置分组的显示模式。
///GridView设置菜单
#region Grid events
private void gridView1_ShowGridMenu(object sender, DevExpress.XtraGrid.Views.Grid.GridMenuEventArgs e) {
if(e.MenuType == DevExpress.XtraGrid.Views.Grid.GridMenuType.Column) {
DevExpress.XtraGrid.Menu.GridViewColumnMenu menu = e.Menu as DevExpress.XtraGrid.Menu.GridViewColumnM
menu.Items.Clear();
if(menu.Column != null) {
menu.Items.Add(CreateCheckItem(&Not Fixed&, menu.Column, FixedStyle.None, imageList2.Images[0]));
menu.Items.Add(CreateCheckItem(&Fixed Left&, menu.Column, FixedStyle.Left, imageList2.Images[1]));
menu.Items.Add(CreateCheckItem(&Fixed Right&, menu.Column, FixedStyle.Right, imageList2.Images[2]));
#endregion
#region New column menu
DXMenuCheckItem CreateCheckItem(string caption, GridColumn column, FixedStyle style, Image image) {
DXMenuCheckItem item = new DXMenuCheckItem(caption, column.Fixed == style, image, new EventHandler(OnFixedClick));
item.Tag = new MenuInfo(column, style);
void OnFixedClick(object sender, EventArgs e) {
DXMenuItem item = sender as DXMenuI
MenuInfo info = item.Tag as MenuI
if(info == null)
info.Column.Fixed = info.S
class MenuInfo {
public MenuInfo(GridColumn column, FixedStyle style) {
this.Column =
this.Style =
public FixedStyle S
public GridColumn C
#endregion
///gridview cardView自动行高
l 行高自动匹配
gridView1.OptionsView.RowAutoHeight = ce.C
cardView1.OptionsBehavior.FieldAutoHeight = ce.C
l 当文字多的时候(行高自动匹配 设置是才有用)
repositoryItemMemoEdit1.LinesCount = ce.Checked ? 0 : 1;
设置自动全部显示该的所有行。
l 图片时(行高自动匹配 设置是才有用)
repositoryItemPictureEdit1.CustomHeight = ce.Checked ? 0 : 40;
///BandedGridView自己订制列的方法
advBandedGridView1.ColumnsCustomization();
advBandedGridView1.DestroyCustomization();
advBandedGridView1.OptionsCustomization.AllowChangeColumnParent = edit.C
advBandedGridView1.OptionsCustomization.AllowChangeBandParent = edit.C
advBandedGridView1.OptionsCustomization.ShowBandsInCustomizationForm = edit.C
///设置 图片动画模式
gridView1.OptionsView.AnimationType = (GridAnimationType)
///根据字段来分组模式
switch(index) {
SetInterval(gridColumn1, ColumnGroupInterval.Alphabetical);
gridColumn2.GroupInterval = ColumnGroupInterval.A
SetInterval(gridColumn5, ColumnGroupInterval.DateMonth);
SetInterval(gridColumn5, ColumnGroupInterval.DateYear);
SetInterval(gridColumn5, ColumnGroupInterval.DateRange);
SetSortMode(gridColumn4, ColumnSortMode.Custom);
SetInterval(gridColumn2, ColumnGroupInterval.Value);
void SetInterval(GridColumn column, ColumnGroupInterval interval) {
column.GroupInterval =
column.GroupIndex = 0;
void SetSortMode(GridColumn column, ColumnSortMode sortMode) {
column.SortMode = sortM
column.GroupIndex = 0;
改变分组样式
gridView1.OptionsView.GroupDrawMode = (GroupDrawMode)
///清除分组
gridView1.ClearGrouping();
foreach(GridColumn column in gridView1.Columns) {
column.GroupInterval = ColumnGroupInterval.D
column.SortMode = ColumnSortMode.D
///CustomDataSummaries设置Grop
private void numCustom_ValueChanged(object sender, System.EventArgs e) {
CustomGridView.UpdateSummary();
UpdateCaptions(numCustom.Value);
private void UpdateCaptions(decimal d) {
CustomGridView.GroupSummary[0].DisplayFormat = &(Order Count [WHERE Freight &= & + d.ToString() + &] = {0})&;
OnSetCaption(&&);
gridView2.FormatConditions[0].Value1 =
protected override void OnSetCaption(string fCaption) {
fCaption = &count records WHERE Freight &= & + numCustom.Value.ToString();
if(Caption != null)
Caption.Text = string.Format(&{0} ({1})&, TutorialName, fCaption);
///下面的效果的实现
Run Designere -& Style Conditions -&Add -&column设置列的 Condition设置条件 value1,value2是参数值
public void setStyle(GridView gridView)
StyleFormatC
cn = new StyleFormatCondition(FormatConditionEnum.Equal, gridView.Columns[&bd_c&], null,false);
cn.ApplyToRow =//false只对列其作用。
cn.Appearance.Font = new Font(AppearanceObject.DefaultFont, FontStyle.Bold);
cn.Appearance.ForeColor = Color.B
gridView.FormatConditions.Add(cn);
///LayoutView
layoutView1.OptionsCarouselMode.PitchAngle = (float)(((int)flatFactor.EditValue) / 360.0f * 2 * Math.PI);///卡片的高度设置flatFactor.EditValue的值(0-360)
layoutView1.OptionsCarouselMode.RollAngle = (float)(((int)rollAngle.EditValue) / 360.0f * 2 * Math.PI);// ///卡片的旋转角度设置rollAngle.EditValue的值(0-360)
layoutView1.OptionsCarouselMode.BottomCardScale = ((int)endSizeScale.EditValue) / 100.0f;
///卡片的距离设置endSizeScale.EditValue的值(0-100)
layoutView1.OptionsCarouselMode.BottomCardAlphaLevel = ((int)endAlpha.EditValue) / 100.0f;
///卡片的卡片透明程度设置endAlpha.EditValue的值(0-100)
layoutView1.OptionsCarouselMode.BottomCardFading = ((int)bottomCardFading.EditValue) / 100.0f; ///卡片的卡片褪色程度设置bottomCardFading.EditValue的值(0-100)
layoutView1.OptionsCarouselMode.CardCount = (int)cardsCount.EditV
///卡片的能显示数量设置cardsCount.EditValue的值(0-20)
layoutView1.OptionsCarouselMode.InterpolationMode = (InterpolationMode)
//修改卡片的方式
///layout卡片的样式在 run designer -& layout里面设置
Size originalCardMinSize = Size.E
private void zoomTrackBarControl1_EditValueChanged(object sender, EventArgs e) {
if(originalCardMinSize == Size.Empty) originalCardMinSize = layoutView1.CardMinS
double koeff = ((int)zoomTrackBarControl1.EditValue) / 100.0 - 0.2;
Size newSize = new Size(originalCardMinSize.Width + (int)(originalCardMinSize.Width * koeff), originalCardMinSize.Height + (int)(originalCardMinSize.Height * koeff));
layoutView1.CardMinSize = newS
}////设置卡片的大小的(zoomTrackBarControl1z(0-100))
下图中设置layoutView位置的方法
protected void SetMasterTableLeftPlacement() {
LayoutItemDragController dc = new LayoutItemDragController(masterTableItem, detailTableItem, InsertLocation.Before, LayoutType.Horizontal);
DoDragItem(dc);
SetMasterViewColumnLayout();
protected void SetMasterTableRightPlacement() {
LayoutItemDragController dc = new LayoutItemDragController(masterTableItem, detailTableItem, InsertLocation.After, LayoutType.Horizontal);
DoDragItem(dc);
SetMasterViewColumnLayout();
private void SetMasterTableTopPlacement() {
LayoutItemDragController dc = new LayoutItemDragController(masterTableItem, detailTableItem, InsertLocation.Before, LayoutType.Vertical);
DoDragItem(dc);
SetMasterViewRowLayout();
protected void SetMasterTableBottomPlacement() {
LayoutItemDragController dc = new LayoutItemDragController(masterTableItem, detailTableItem, InsertLocation.After, LayoutType.Vertical);
DoDragItem(dc);
SetMasterViewRowLayout();
protected void DoDragItem(LayoutItemDragController dc) {
masterTableItem.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.D
masterTableItem.Move(dc);
protected void SetMasterViewColumnLayout() {
SetMasterItemVerticalSize();
employesLayoutView.OptionsBehavior.AllowSwitchViewModes =
employesLayoutView.OptionsView.ViewMode = LayoutViewMode.C
employesLayoutView.OptionsBehavior.AllowSwitchViewModes =
employesLayoutView.Refresh();
protected void SetMasterViewRowLayout() {
SetMasterItemHorizontalSize();
employesLayoutView.OptionsBehavior.AllowSwitchViewModes =
employesLayoutView.OptionsView.ViewMode = LayoutViewMode.R
employesLayoutView.OptionsBehavior.AllowSwitchViewModes =
employesLayoutView.Refresh();
private DevExpress.XtraLayout.LayoutControlItem masterTableI
///直接打印gridcontrol
Cursor currentCursor = Cursor.C
Cursor.Current = Cursors.WaitC //取当前的鼠标。并设置
if(DevExpress.XtraPrinting.PrintHelper.IsPrintingAvailable)
DevExpress.XtraPrinting.PrintHelper.ShowPreview(gridControl1);///打印
MessageBox.Show(&XtraPrinting Library is not found...&, &Information&, MessageBoxButtons.OK, rmation);
Cursor.Current = currentC
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:465103次
积分:4976
积分:4976
排名:第5480名
原创:105篇
转载:81篇
评论:34条
(2)(5)(1)(8)(2)(2)(3)(2)(2)(8)(3)(3)(2)(6)(1)(6)(5)(11)(7)(3)(3)(4)(3)(4)(2)(5)(11)(7)(8)(8)(5)(9)(8)(4)(1)(13)(5)(9)

我要回帖

更多关于 o grid l grid c grid 的文章

 

随机推荐