当前位置: 首页 > wzjs >正文

网站站内交换链接怎么做装修全包报价明细表2023

网站站内交换链接怎么做,装修全包报价明细表2023,wordpress 标题长度 省略号,建设公司名字DevExpress WinForms拥有180组件和UI库,能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForms能完美构建流畅、美观且易于使用的应用程序,无论是Office风格的界面,还是分析处理大批量的业务数据,它都能轻松胜…

DevExpress WinForms拥有180+组件和UI库,能为Windows Forms平台创建具有影响力的业务解决方案。DevExpress WinForms能完美构建流畅、美观且易于使用的应用程序,无论是Office风格的界面,还是分析处理大批量的业务数据,它都能轻松胜任!

DevExpress WinForms中文使用教程图集

在本教程中,您将学习如何使用DevExpress WinForms在代码中创建带状和高级带状布局。首先将主视图切换到所需的类型,然后您将创建第一级带状和子带状来创建层次结构。初始化带状之后,将创建列并将它们链接到父带状,最后您将切换到高级带状网格视图,把列移动到第二行,并让列标题填充它们下面的空白空间。

获取DevExpress WinForms 正式版下载

开始

从一个绑定到Car数据库的Grid Control应用程序开始。

DevExpress WinForms中文使用教程图集

切换到带状网格视图

Ribbon控件中的Create Banded Layout按钮将启动把布局切换到带状视图的代码,在Click事件处理程序中,创建一个BandedGridView实例,禁用其ColumnViewOptionsBehavior.AutoPopulateColumns选项,并将结果对象分配给网格的GridControl.MainView 属性。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// Switch to the Banded Grid View.
BandedGridView view = new BandedGridView();
view.OptionsBehavior.AutoPopulateColumns = false;
gridControl1.MainView = view;
}

运行应用程序并单击Create Banded Layout按钮,布局切换了,但是新创建的View是空的,因为禁用了自动列生成。

DevExpress WinForms中文使用教程图集

创建顶级Bands

关闭应用程序并返回处理程序代码,创建GridBand实例,在顶层分层级别添加Main、Performance Attributes和Notes band,将对象添加到视图的BandedGridView.Bands集合中。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// ...
// Create top-level bands.
GridBand bandMain = new GridBand() { Name = "bandMain", Caption = "Main" };
GridBand bandPerformanceAttributes = new GridBand() { Name = "bandPerformance", Caption = "Performance Attributes" };
GridBand bandNotes = new GridBand() { Name = "bandNotes", Caption = "Notes" };
view.Bands.AddRange(new GridBand[] { bandMain, bandPerformanceAttributes, bandNotes });
}

运行应用程序,单击按钮,现在视图将显示bands。

DevExpress WinForms中文使用教程图集

创建嵌套Bands

这一次,创建嵌套bands,为此创建新的band对象并将它们添加到主band的GridBand.Children集合中。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// ...
// Create nested bands.
GridBand bandModel = new GridBand { Name = "bandModel", Caption = "Model" };
GridBand bandPrice = new GridBand { Name = "bandPrice", Caption = "Price" };
bandMain.Children.AddRange(new GridBand[] { bandModel, bandPrice });
}

运行应用程序并单击按钮来查看新的分层band结构。

DevExpress WinForms中文使用教程图集

创建带状列

返回到单击处理程序代码并创建由BandedGridColumn对象表示的列,初始化它们的GridColumn.FieldName属性并使它们可见,将创建的列添加到视图的BandedGridView.Columns集合中。

使用GridColumn.DisplayFormat属性将Price列值格式化为货币。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// ...
// Create banded grid columns and make them visible.
BandedGridColumn colTrademark = new BandedGridColumn() { Name = "colTrademark", FieldName = "Trademark", Visible = true };
BandedGridColumn colModel = new BandedGridColumn() { Name = "colModel", FieldName = "Model", Visible = true };
BandedGridColumn colCategory = new BandedGridColumn() { Name = "colCategory", FieldName = "Category", Visible = true };
BandedGridColumn colPrice = new BandedGridColumn() { Name = "colPrice", FieldName = "Price", Visible = true };
BandedGridColumn colHP = new BandedGridColumn() { Name = "colHP", FieldName = "HP", Visible = true };
BandedGridColumn colLiter = new BandedGridColumn() { Name = "colLiter", FieldName = "Liter", Visible = true };
BandedGridColumn colCyl = new BandedGridColumn() { Name = "colCyl", FieldName = "Cyl", Visible = true };
BandedGridColumn colDescription = new BandedGridColumn() { Name = "colDescription", FieldName = "Description", Visible = true };
BandedGridColumn colPicture = new BandedGridColumn() { Name = "colPicture", FieldName = "Picture", Visible = true };
view.Columns.AddRange(new BandedGridColumn[] { colTrademark, colModel, colCategory, colPrice, colHP, colLiter, colCyl, colDescription, colPicture });// Format the Price column values as currency.
colPrice.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
colPrice.DisplayFormat.FormatString = "c2";
}

运行应用程序并再次点击按钮,列没有显示在视图中,这是因为它们还没有链接到bands 。

DevExpress WinForms中文使用教程图集

为Bands分配列

要将列添加到Bands中,请设置列的BandedGridColumn.OwnerBand属性。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// ...
// Assign columns to bands.
colTrademark.OwnerBand = bandModel;
colModel.OwnerBand = bandModel;
colCategory.OwnerBand = bandModel;
colPrice.OwnerBand = bandPrice;
colHP.OwnerBand = bandPerformanceAttributes;
colLiter.OwnerBand = bandPerformanceAttributes;
colCyl.OwnerBand = bandPerformanceAttributes;
colDescription.OwnerBand = bandNotes;
colPicture.OwnerBand = bandNotes;
}

运行应用程序,单击按钮,可以看到列现在在相应的bands下可见。

DevExpress WinForms中文使用教程图集

切换到高级带状网格视图

返回代码并修改处理程序,使其创建高级带状网格视图替代标准带状网格视图,只需为视图使用一个不同的类,其余的代码将继续工作。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// Switch to the Advanced Banded Grid View.
AdvBandedGridView view = new AdvBandedGridView();
view.OptionsBehavior.AutoPopulateColumns = false;
gridControl1.MainView = view;
// ...
}

运行应用程序,布局和以前一样,只是列的自动宽度功能现在被禁用了。

将列排列成多行

关闭应用程序并将列标题排列到多行中,要在父bands内的其他列下显示Category和Liter列,请将它们的 BandedGridColumn.RowIndex 属性设置为1。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// ...
// Set the vertical position of column headers.
colCategory.RowIndex = 1;
colLiter.RowIndex = 1;
}

再次运行应用程序,可以看到更改,但是现在在某些列标题下出现了空格。

DevExpress WinForms中文使用教程图集

自动拉伸列标题

要自动修改列标题的高度来填充空白空间,请启用它们的BandedGridColumn.AutoFillDown选项。

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemCl
// ...
// Stretch columns to fit empty spaces below them.
colPrice.AutoFillDown = true;
colDescription.AutoFillDown = true;
colPicture.AutoFillDown = true;
}

运行应用程序并再次单击Create Banded Layout按钮来查看最终结果。

DevExpress WinForms中文使用教程图集

完整代码

C#

private void btnCreateBandedLayout_ItemClick(object sender, ItemClickEventArgs e) {
// Switch to the Advanced Banded Grid View.
AdvBandedGridView view = new AdvBandedGridView();
view.OptionsBehavior.AutoPopulateColumns = false;
gridControl1.MainView = view;// Create top-level bands.
GridBand bandMain = new GridBand() { Name = "bandMain", Caption = "Main" };
GridBand bandPerformanceAttributes = new GridBand() { Name = "bandPerformance", Caption = "Performance Attributes" };
GridBand bandNotes = new GridBand() { Name = "bandNotes", Caption = "Notes" };
view.Bands.AddRange(new GridBand[] { bandMain, bandPerformanceAttributes, bandNotes });// Create nested bands.
GridBand bandModel = new GridBand { Name = "bandModel", Caption = "Model" };
GridBand bandPrice = new GridBand { Name = "bandPrice", Caption = "Price" };
bandMain.Children.AddRange(new GridBand[] { bandModel, bandPrice });// Create banded grid columns and make them visible.
BandedGridColumn colTrademark = new BandedGridColumn() { Name = "colTrademark", FieldName = "Trademark", Visible = true };
BandedGridColumn colModel = new BandedGridColumn() { Name = "colModel", FieldName = "Model", Visible = true };
BandedGridColumn colCategory = new BandedGridColumn() { Name = "colCategory", FieldName = "Category", Visible = true };
BandedGridColumn colPrice = new BandedGridColumn() { Name = "colPrice", FieldName = "Price", Visible = true };
BandedGridColumn colHP = new BandedGridColumn() { Name = "colHP", FieldName = "HP", Visible = true };
BandedGridColumn colLiter = new BandedGridColumn() { Name = "colLiter", FieldName = "Liter", Visible = true };
BandedGridColumn colCyl = new BandedGridColumn() { Name = "colCyl", FieldName = "Cyl", Visible = true };
BandedGridColumn colDescription = new BandedGridColumn() { Name = "colDescription", FieldName = "Description", Visible = true };
BandedGridColumn colPicture = new BandedGridColumn() { Name = "colPicture", FieldName = "Picture", Visible = true };
view.Columns.AddRange(new BandedGridColumn[] { colTrademark, colModel, colCategory, colPrice, colHP, colLiter, colCyl, colDescription, colPicture });// Format the Price column values as currency.
colPrice.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric;
colPrice.DisplayFormat.FormatString = "c2";// Assign columns to bands.
colTrademark.OwnerBand = bandModel;
colModel.OwnerBand = bandModel;
colCategory.OwnerBand = bandModel;
colPrice.OwnerBand = bandPrice;
colHP.OwnerBand = bandPerformanceAttributes;
colLiter.OwnerBand = bandPerformanceAttributes;
colCyl.OwnerBand = bandPerformanceAttributes;
colDescription.OwnerBand = bandNotes;
colPicture.OwnerBand = bandNotes;// Set the vertical position of column headers.
colCategory.RowIndex = 1;
colLiter.RowIndex = 1;// Stretch columns to fit empty spaces below them.
colPrice.AutoFillDown = true;
colDescription.AutoFillDown = true;
colPicture.AutoFillDown = true;
}


文章转载自:

http://7KPwiHlo.gcqdp.cn
http://DSYaZ1JK.gcqdp.cn
http://h0thhCS7.gcqdp.cn
http://SoDZ9qoM.gcqdp.cn
http://FxaUVPWO.gcqdp.cn
http://H5tPmmXh.gcqdp.cn
http://b98CyLOI.gcqdp.cn
http://HrREOvUc.gcqdp.cn
http://BzGtmTm6.gcqdp.cn
http://M3vONbjq.gcqdp.cn
http://Q3EFV9Ex.gcqdp.cn
http://QDNusDCk.gcqdp.cn
http://IQyjMhiM.gcqdp.cn
http://fdpJktgM.gcqdp.cn
http://lfe9ba5s.gcqdp.cn
http://AplNBjSY.gcqdp.cn
http://2wRiba8F.gcqdp.cn
http://6f4OV2WC.gcqdp.cn
http://sC2G182j.gcqdp.cn
http://RAwNtDh9.gcqdp.cn
http://8y1w4M18.gcqdp.cn
http://fThrawHo.gcqdp.cn
http://JUFG1yCF.gcqdp.cn
http://I100lp3M.gcqdp.cn
http://67o2OAmr.gcqdp.cn
http://Gldvqh7e.gcqdp.cn
http://bdajE41H.gcqdp.cn
http://Fg53wkaY.gcqdp.cn
http://2pLsShqL.gcqdp.cn
http://3diAFpG1.gcqdp.cn
http://www.dtcms.com/wzjs/743811.html

相关文章:

  • 网站建设公司多少钱wordpress分类页仿京东
  • 能通过付费网站看别人空间吗linux php网站部署
  • 潍坊网站建设小程序销售网站
  • 做网站阿里云买哪个服务器好点信用网站标准化建设
  • php网站开发专业介绍wordpress添加前台漂亮注册页面
  • 龙华营销型网站网站制作 西安
  • 长沙装修网站排名wordpress 酒店
  • 北京网站建设公司兴田德润专业江西做网站的公司
  • 宁波免费建站seo排名linux网站开发软件
  • 高能建站网站建设经验材料
  • 京东联盟需要自己做网站吗小城镇建设网站的观点
  • ps做网站视图大小我要表白网站
  • 免费的ai写作网站济南专门做网站的公司有哪些
  • 网站服务器怎么收费wordpress改登陆地址
  • 网站开发与维护3 6年级手工小制作
  • 济南智能网站建设服务安卓做网站教程
  • 烟台微信网站建设怎么查看网站空间
  • 江西省网站建设公司wordpress做seo
  • 网站添加备案号烟台公司中企动力提供网站建设
  • 揭阳网站建设方案托管asp做的是系统还是网站
  • 网站建设与管理试卷答案报告怎么写范文大全
  • 石家庄校园兼职网站建设wordpress搜索页
  • 企业网站服务费怎么做记账凭证本wordpress慢
  • 龙岗网站建设 公司推广中国网络推广网站排名
  • 网站怎么做好 优帮云企业展示建设网站
  • 广州车陂网站建设公司公司网站建设排名
  • 电子商务网站的建设过程漫画网站开发源码
  • 五金模具技术支持 东莞网站建设昆明网站制作的方法
  • 怎样建设网站流程网络教育
  • 2003访问网站提示输入用户名密码网页开发需要的技术