to的用法口诀_css3 grid布局

to的用法口诀_css3 grid布局.安装完之后开始-程序的菜单里有Create Visual Studio Toolbox Tab.要执行一下.在vs 的工具箱里生成infragistics的标签..不然连控 件都找不到哦…菜单里还有一个sample…能 实现的效果大部分都在里面了…根据你自己 的需求,可以在里面找….菜单里还有个 document..里面有各个控件的’指南’,’例子’.还 有api和客户端脚本ap

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

.安装完之后开始程序的菜单里有Create Visual Studio Toolbox Tab.要执行一下.vs 的工具箱里生成infragistics的标签..不然连控 件都找不到哦菜单里还有一个sample…能 实现的效果大部分都在里面了根据你自己 的需求,可以在里面找….菜单里还有个 document..里面有各个控件的指南‘,’例子‘.还 有api和客户端脚本api… 2.安装程序会在C:/Inetpub/wwwroot/aspnet_client/infragistics下生成一个包含运 行时资源文件夹(包括图片,css等文件)..所以 这个文件夹比较重要(在你没有appstle的情 况下)…后面会说 3.然后在安装目录下有dll文件的打包.我这里 是C:/Program Files/Infragistics/NetAdvantage for .NET 2007 Vol. 3 CLR 2.0/ASP.NET/Bin – Signed这个文件夹.网站发布 时.要把这个rar文件解压到bin文件夹下.不然 没有dll文件怎么执行啊.. 4.还附送了一个appstylelist的小软件,可以设 置空间外观,有了这个就不用去学习,设置那些 复杂的外观属性了.非常方便..而且用了这个,2 里提到的那个文件夹几乎就没用了… 5.在你第一次拖动一个控件到页面时..会在你 得根目录下生成一个licenses.licx文件..不要 删了哦.. 6.可以在虚拟主机下运行,看到网上有得文章 说还要手动iis虚拟路径之类的..不需要..只要 把相关文件(图片和dll)考到项目里的相关附 录就可以了.. 前言部分就这么多了..之后会说说控件..每种 控件的功能,用法,代码控制的方法..

转于http://blog.csdn.net/jingshuaizh/archive/2008/07/22/2689440.aspx

Infragistics ASP.NET控件用法总结 一、UltraWebGrid的基本用法 

1、 如何手工增加列 第一步:将ControlSetting->DisplayOut->AutoGenerate置为False:表示不让控件自 动添加列第二步:添加自己需要的列: BaseColumnName即你要梆定的字段名; Key:指定该列的别人,方便以后寻找该列的 值; Header->Caption: 表头文字 

2、 冻结某列

this.UltraWebGrid1.DisplayLayout.UseFixedHeaders = true;

this.UltraWebGrid1.Bands[0].Columns.FromKey(“Edit”).Header.Fixed = true; 

3、 向表格中添加其它控件 ControlSetting->Columns->选中你要操作的 列->EditorControlID->选择你要梆定的控件 名 

4、 表格中添加一列Button按钮 ControlSettings->Columns->选中要修改为 安按钮的行->Type->Button 

5、 合并单元格 Control Settings->Columns->列名->Header->RowLayoutColumnInfo; SpanX:跨几列 OriginX:哪一列开始 //增加一个带图片的表头 foreach(Infragistics.WebUI.UltraWebGrid.UltraGridColumn c in e.Layout.Bands[0].Columns) { c.Header.RowLayoutColumnInfo.OriginY = 1; } // 添加一个大的表头 Infragistics.WebUI.UltraWebGridColumnHeader ch = new Infragistics.WebUI.UltraWeb GridColumnHeader(true); ch.Caption = “大表头的名字” ch.RowLayoutColumnInfo.OriginY = 0; //设置添加表头的Y轴位置 ch.RowLayoutColumnInfo.SpanX = 3;

置要跨的列数 ch.Image.Url =”./images/bankingbtn.gif”; //添加图片 ch.Image.AlternateText = “Employee Name Grouping”; e.Layout.Bands[0].HeaderLayout.Add(ch); //将上面的设置添加到该表中 

6、 添加 字控件,并设置为可点击累加 数字 第一步:将控件WebNumericEdit->SpinButtons->Display设置为:OnRight 第二步:将UltraWebGrid中要梆定该控件的 那一列的Type设置为:Custom * 设置某列只读; Allupdate = no 7

7、 、 隐藏表头顶端的那一行 DisplayLayout->GroupByBox->Hidden = true 

8、 固定Header那一行 this.UltraWebGrid1.DisplayLayout.StationaryMargins = Infragistics.WebUI.UltraWebGrid. StationaryMargins.Header;

9、 指定列头中字体的显示位置 Control Settings->Band[0]->HeaderStyle->HorizontalAlign = Center

10、指定表格中字体的显示位置 Control Settings->Band[0]->RowStyle->HorizontalAlign = Center //全部 Control Settings->Columns->列名->CellStyle->HorizontalAlign = Center //设订 某一列 

11、整张表不允许编辑 Control Settings->Band[0]->AllUpdate = no

 12、选择一行 Control Settings->Band[0]->CellClickAction = RowSelect 1

13、增加一行

UltraWebGrid.DisplayLayout.Row.Add(); 

14、确认对话框事件 指定客户端事件:UltraWebGrid1->DisplayLayout->ClientSizeEvents-> ClickCellButtonHandler:CellButtonClick 函数的定义: function CellButtonClick(gridName, cellId) { if (cellId.substring(cellId.lastIndexOf(“_”) + 1, cellId.lastIndexOf(“_”) + 3) == “8”) { return !confirm(“确信要删除此行 数据吗?”); } } 

15、分页处理 UltraWebGrid1->DisplayOut->Pager->AllowPaging=True,然后是PageSize等设 置。 Pattern设置:这个模板就是用来自定义 显示效果的 

<table><tr><td> [page:1:首页[currentpageindex]页 共[pagecount]页 [prev] [next]</td><td align=right> [default] </td></tr></table> 

二、WebCombo的基本用法 

1、 实现可输可选的下拉表格 Editable->True

 将下拉表格加载到UltraWebGrid中去

 2

 UltraWebGrid1.Columns[1].Type = ColumnType.DropDownList;

UltraWebGrid1.Columns[1].ValueList.WebCombo = WebComboGood

原文地址:http://hi.baidu.com/%D1%EE%D0%F9%E5%E3/blog/item/3fecda55e3e0e75c574e00a9.html Infragistics NetAdvantage UltraWebGrid使 用之一

在一个UltraWebGrid的第一个 column(Template Column)放了一個 Checkbox ,检查整个UltraWebGrid中的勾取 情況,然后执行相关的操作。 foreach(datarow row in grid.rows) { checkbox c = (checkbox)row.columns[0].findcontrol(“checkbox”); if(c.checked) { //do shomething by row data } } //取得全部的TemplateColumn,她把第一个 列(column)数据都放在一个列表中 UltraWebGrid.TemplatedColumn tcol = (WebUI.UltraWebGrid.TemplatedColumn)UltraWebGrid1.Bands[0].Columns[0]; //取得每一個columnCell內容 foreach (Infragistics.WebUI.UltraWebGrid.CellItem item in tcol.CellItems) { CheckBox chkIsHaveRight = (CheckBox)item.FindControl(“chkIsSendEmail”); if (chkIsHaveRight.Checked == true) { //通過訪問父對象取得其他資料 //item->cell->row->cell[4]->內容;在這過程 中cellitem的父對象,rowcell的父對 象,再訪問row下面的每4Cell,再取得該 Cell的內容。 string info = item.Cell.Row.Cells[4].Text; } }

1. UltraWebGrid添加模板列: 先选择UltraWebGrid —属性–columns–勾选Templated column 即可

<igtbl:TemplatedColumn AllowResize=”Free” BaseColumnName=”BT” ChangeLinksColor=”True” HeaderText=”标题” Key=”BT” Type=”HyperLink”> <CellTemplate> <asp:LinkButton ID=”LinkButton1″ CssClass=”WordBreak” CommandArgument='<%# DataBinder.Eval(Container.DataItem,”AQJYGXID”) %>’ Text='<%# DataBinder.Eval(Container.DataItem,”BT”) %>’ ToolTip='<%# DataBinder.Eval(Container.DataItem,”BT”) %>’ CommandName=”showdetail” runat=”server” Font-Underline=”false”></asp:LinkButton> </CellTemplate> <Header Caption=”标题“> <RowLayoutColumnInfo OriginX=”2″ /> </Header> <Footer> <RowLayoutColumnInfo OriginX=”2” /> </Footer> </igtbl:TemplatedColumn>

2. UltraWebGrid日期列: 设置日期列的 Format属性:yyyy-MM-ddDate) DataType属性为System.DateTime

3。取某行的某列(列名:BIDPRICE)的 值: UltraWebGrid1.Rows[i].Cells.FromKey(“BIDPRICE”).Value 或者UltraWebGrid1.Rows[i].Cells[j].Value 取某列: UltraWebGrid1.Columns.FromKey(“BIDPRICE”).Value

4。标题行居中显示: <HeaderStyleDefault BackColor=”LightGray” BorderStyle=”Solid” HorizontalAlign=”Center”> </HeaderStyleDefault>

对应项居中 <CellStyle HorizontalAlign=”Center”></CellStyle> 5.UltraWebGrid的固定列功能 具体步骤: (1) UltraWebGrid下的DisplayLayout 中把TableLayout属性设为:Fixed ; UseFixedHeaders设为:True //这是指定 Grid允许固定列 StationaryMargins=”Header” //这使Header 始终在最上面显示 (2) 设定列固定: Header下面的Fixed设置为 true。这样就可以实现ID固定了,但效果图 中还有一个功能就是,点击后面的任何一个 列后的图钉图标,就可以任意进行多列固 定了。如下图为我点击了“ContactName”的 效果:这种功能的实现,只要修改一个属 性: FixedHeaderIndicatorDefault=”Button”就可 以了。 6UltraWebGrid 最下面线显示问题: 选择UltraWebGrid点击》选择Bands And ColumnsDefaultrowHeight设置高度 即 可。

7. 选择一行以后获得选定行指定列的值 if (e.InnerCommandEventArgs.CommandName == “showdetail”) { int id = Convert.ToInt32(e.InnerCommandEventArgs.CommandArgument);

for (int i = 0; i < UltraWebGrid1.DisplayLayout.SelectedRows.Count; i++) { if (UltraWebGrid1.DisplayLayout.SelectedRows[i].Cells[6].Text == “未审批“)//选取一行以后获得选定行指定 列的值 { string url2 = “../zhishishenbaobiao/zssbview.aspx?id=” + id + ” “;

Page.RegisterStartupScript(“showinfo”, ” <mce:script type=”text/javascript”><!–window.open(‘” + url2 + “‘,’未审批知识信息 查 看‘,’width=850,height=600,toolbar=no,scrollbars=yes,status=yes,resizable=yes’); // –></mce:script>”); } else { string url2 = “../zhishishenbaobiao/showview.aspx?id=” + id + ” “;

Page.RegisterStartupScript(“showinfo”, ” <mce:script type=”text/javascript”><!–window.open(‘” + url2 + “‘,’已审批知识信息 查 看‘,’width=850,height=600,toolbar=no,scrollbars=yes,status=yes,resizable=yes’); // –></mce:script>”); } }

} 7. UltraWebGrid 单击单元格选中行 (1) 选择UltraWebGrid-displayout CellClickActionDefault=RowSelected (2) 选择UltraWebGrid-智能选择卡–Bands And Columns–Band[“”]–SelectRowStyleBackColor属性

8. 设置UltraWebGrid的第0列为模板列,加入 CheckBox控件,判断其状态是否被选中,代 码如下: //可以写在任何地方,属于通用代码 Infragistics.WebUI.UltraWebGrid.TemplatedColumn tcol = (TemplatedColumn)UltraWebGrid1.Bands[0].Columns[0];//模板列

 in

 item

 foreach(CellItem

 tcol.CellItems) {

System.Web.UI.WebControls.CheckBox chkIsHaveRight = (System.Web.UI.WebControls.CheckBox)item.FindControl(“chbShenhe”); if(chkIsHaveRight.Checked == true) { //进行相关的操作 } }

9.禁止操作列 (1) 禁止操作一列数据

Infragistics.WebUI.UltraWebGrid.TemplatedColumn tcol = (TemplatedColumn)UltraWebGrid1.Bands[0].Columns[9];//模板列 foreach (CellItem item in tcol.CellItems) {

System.Web.UI.WebControls.ImageButton chkIsHaveRight = (System.Web.UI.WebControls.ImageButton)item.FindControl(“ImageButton3”); chkIsHaveRight.Enabled = false; } 2) 禁止操作某列中已审批列 Infragistics.WebUI.UltraWebGrid.TemplatedColumn tcol = (TemplatedColumn)UltraWebGrid1.Bands[0].Columns[9];//模板列 foreach (CellItem item in tcol.CellItems) {

System.Web.UI.WebControls.ImageButton chkIsHaveRight = (System.Web.UI.WebControls.ImageButton)item.FindControl(“ImageButton3”); if (item.Cell.Row.Cells[6].Text == “已审批“) { chkIsHaveRight.Enabled = false;//已审批按钮禁止选择 } else { chkIsHaveRight.Enabled = true; } }

10. webgrid 的 RowChanged 事件没有相应 解决:客户端代码中<LayoutSettings AllowAddNew=”Yes” AllowDelete=”Yes” AllowEdit=”Yes” RowChangedAction=”OnTheFlyPostback”> </LayoutSettings> 设置 RowChangedAction=”OnTheFlyPostback”

11 .客户端事件在哪里添加 解决:<LayoutSettings AllowAddNew=”Yes” AllowDelete=”Yes” AllowEdit=”Yes” RowChangedAction=”OnTheFlyPostback”> <ClientSideEvents OnRowValidate=”wgUserRole_OnRowValidate” /> </LayoutSettings> ClientSideEvents 中可以添加客户端 事件

12.WebGrid 的列内容唯一 解决: 因为我们是通过 datatable 绑定 的。。绑定前 DataColumn 设置列.Unique = true; 13.隐藏一列 解决:把改列的宽设置为 0px 或者 UltraWebGrid1.Columns[i].Hidden = true; 14.WebGridIE6IE7中拖动错位解决办 法: 修改aspx页面中的 <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 4.0 Transitional//EN”>. 15.WebGrid排序列 protected void UltraWebGrid2_SortColumn(object sender, SortColumnEventArgs e) { string newSortDirection; string sqltemp = “”; //正逆序切换 if (oldSortDirection == “ASC”) newSortDirection = “DESC”; else newSortDirection = “ASC”; oldSortDirection = newSortDirection; if (e.ColumnNo != 0) { if (sqlwhere != “”) { sqltemp +=” ” + UltraWebGrid1.Columns[e.ColumnNo].Key + ” ” + newSortDirection; moDataView.RowFilter = “1=1” + sqlwhere;//sqlwhere查询条件 moDataView.Sort = sqltemp;//按选 择字段排序 if (moDataView.Count == 0) { UltraWebGrid1.DataSource = moDataView; UltraWebGrid1.DataBind(); } else { UltraWebGrid1.DataSource = moDataView; UltraWebGrid1.DataBind(); } } else { moDataView.RowFilter = “”; UltraWebGrid1.DataSource = moDataView; UltraWebGrid1.DataBind(); } } }

Infragistics NetAdvantage 组件说明 WebGrid(二)

UltraWebGrid 客户端对象树

Webgrid虽然是基于服务的控件,但是它也 为客户端开发提供了强大的支持,Client Side Object Model是基于javascript对象模式 的,它能许多功能而不需要往服务器回送。 Ø Grid 对象: 通过var grid =igtbl_getGridById(‘UltraWebGrid1’);获取, 也可以直接引用oUltraWebGrid1 常用属性: n bands:得到属于这个gridbands数 组 在客户端中没有bands集合对象,代替它的 是利用gridbands属性来实现 var grid = igtbl_getGridById(‘UltraWebGrid1’); grid.bands[0].RowSizing = 2; n rows:返回所有gridband0)中所 有rows var grid = igtbl_getGridById(‘UltraWebGrid1’); grid.Rows.getRow(0).RowSizing = 2; Ø Band对象: 代表所有的与之层次对应的所有的rows 通过 var band = igtbl_getGridById(‘UltraWebGrid1’).Bands[n]; 获取或var band = igtbl_getBandById(‘cellId’); 常用属性:

 Columns:得到一个Columns数组,

 n

 原理类似于grid中的bands属性 var band = igtbl_getBandById(‘cellId’); band.columns[0].HeaderClickAction = 1; Ø Column对象 通过var col = igtbl_getGridById(‘UltraWebGrid1’).Bands[n].Columns[m]; 获取或var col = igtbl_getColumnById(‘cellId’); 常用方法:

 SetHidden方法

 n

 setHidden(true):隐藏指定列 Ø Cell对象 通过Row.getCell(n)获取 常用方法 n SetValue n GetValue n GetPrevCell

 getNextCell

 n

 Ø Row对象 Row对象不是为grid中每行自动产生的,而 是根据需要动态创建的 通过igtbl_getRowById(cellId)获取,或 Rows.getRow(n)获取,或 igtbl_getActiveRow(gridName)获取。 常用方法: n getCell(index) 返回当前行中指定的Cell对象,索引是从0开 始的。 Ø Rows集合对象 实际应用

数据源

Ø Dataset webgrid可以使用许多数据源,只要这些数据 源实现IList, ITypedList or IBindingList 接口 就可以应用。最强大之处可以包含多个相关 的datatable,把这些datatable以分层grid的 方式来表现。 UltraWebGrid1.DataSource = dataset UltraWebGrid1.DataBind() Ø InitializeLayout事件中可以隐藏某 列。 e.Layout.Bands(0).Columns.FromKey(“Salary”).Hidden = True 数据操作

Ø 显示一个值,存储另一个值 利用ValueList,dataValue,DisplayText Dim valueList As Infragistics.WebUI.UltraWebGrid.ValueList valueList = new Infragistics.WebUI.UltraWebGrid.ValueList() valueList.ValueListItems.Add 1, “One” valueList.ValueListItems.Add 2, “Two” valueList.ValueListItems.Add 3, “Three” valueList.DisplayStyle = Infragistics.WebUI.UltraWebGrid.ValueListDisplayStyle.DisplayText UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey(“Notes”).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList UltraWebGrid1.DisplayLayout.CellClickActionDefault = Infragistics.WebUI.UltraWebGrid.CellClickAction.Edit

Infragistics NetAdvantage 组件说明 WebGrid(三) UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey(“Notes”).ValueList = valueList 另外一种方式 UltraWebGrid1.Columns(0).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList Dim PlantList As ValueList = UltraWebGrid1.Columns(0).ValueList PlantList.DataSource = db.getAllPlantInfo.Tables(0).DefaultView PlantList.ValueMember = “plantnum” PlantList.DisplayMember = “plantname” 必 须和查询出的字段大小写一致 PlantList.DataBind() UltraWebGrid1.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes UltraWebGrid1.DisplayLayout.CellClickActionDefault = CellClickAction.Edit 关于表格原有数据键值或编号绑定问题 利用Cell.Title解决这个问题 Dim ds1 As DataSet ds1 = db.getAllPlantInfo UltraWebGrid1.Columns(0).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList Dim PlantList As ValueList = UltraWebGrid1.Columns(0).ValueList PlantList.DataSource = ds1.Tables(0).DefaultView PlantList.ValueMember = “plantnum” PlantList.DisplayMember = “plantname” PlantList.DataBind() UltraWebGrid1.Columns(1).Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList Dim PlantList2 As ValueList = UltraWebGrid1.Columns(1).ValueList PlantList2.DataSource = ds1.Tables(0).DefaultView PlantList2.ValueMember = “plantnum” PlantList2.DisplayMember = “plantname” PlantList2.DataBind()

UltraWebGrid1.DisplayLayout.AddNewBox.Prompt = “增加->”

UltraWebGrid1.Bands(0).AddButtonCaption = “出让方” Dim ds As DataSet ds = db.getFdqjy UltraWebGrid1.DataSource = ds.Tables(0).DefaultView

UltraWebGrid1.Columns(0).AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes

UltraWebGrid1.Columns(1).AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes

UltraWebGrid1.Columns(2).AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes

UltraWebGrid1.DisplayLayout.AllowDeleteDefault = AllowDelete.Yes

UltraWebGrid1.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes

UltraWebGrid1.DisplayLayout.RowSelectorsDefault = RowSelectors.Yes

UltraWebGrid1.DisplayLayout.CellClickActionDefault = CellClickAction.RowSelect UltraWebGrid1.DataBind() Dim en As UltraGridRowsEnumerator en = UltraWebGrid1.Bands(0).GetRowsEnumerator() Dim row As UltraGridRow While en.MoveNext() <> Nothing row = en.Current row.Cells(0).Title = ds.Tables(0).Rows(row.Index).Item(0) row.Cells(1).Title = ds.Tables(0).Rows(row.Index).Item(2) End While 说明:原希望通过cell.text cell.value解 决,但是通过查询资料和试验,发现text作 为value的辅助,他们的是重叠的,其中一个 设置会覆盖另一个。Title则可以插入到cell的 tag中 Ø 用户接口:选择、激活、编辑 rowcell可以作为激活的对象,并且如果 cell为激活则包含cellrow自动成为激活 Active不同于选择,多行可以选择,但在某 一时刻只能有1 row和 1 Cell可以是激活的。

Ø 去掉滚动条 Me.UltraWebGrid1.Width=Unit.Percentage(100) Me.UltraWebGrid1.Height=Unit.Percentage(100) Me.UltraWebGrid1.DisplayLayout.FrameStyle.CustomRules = “table-layout:auto” Ø 行的选择和激活行 当指向一个行时,这个行就会编程active row,成为active row由以下几个因素决 定, 1. 当行中的某个cell进入编辑模式,行就自 动成为激活; 2. 选择行,多选时,最头一个行作为 active row; 3. 通过代码 UltraWebGrid1.DisplayLayout.ActiveRow = UltraWebGrid1.Rows(0) 可以调整active row的外观 UltraWebGrid1.DisplayLayout.ActiveRow.Style.BackColor = Color.Red UltraWebGrid1.DisplayLayout.ActiveRow.Style.Border = Color.Blud Ø 改变激活行 Dim objRow As Infragistics.WebUI.UltraWebGrid.UltraGridRow objRow = Me.UltraWebGrid1.Rows(5) Me.UltraWebGrid1.ActiveRow = objRow Ø Cell选择和激活 成为active cell的条件与行类似。 UltraWebGrid1.DisplayLayout.ActiveCell = UltraWebGrid1.Rows(0).Cells(0) 可以调整active cell的外观 UltraWebGrid1.DisplayLayout.ActiveCell.Style.BackColor = Color.Red Ø click Cell时进入编辑模式 Me.UltraWebGrid1.DisplayLayout.AllowUpdateDefault = AllowUpdate.Yes Me.UltraWebGrid1.DisplayLayout.CellClickActionDefault = CellClickAction.Edit

 cell中内嵌编辑控件

 Ø

 1. 把编辑控件(日期选择控件)加入到页 面中,把编辑控件的边设成None 2. 加入webgrid, displayout.AllwoUpdateDefaultTrue 3. 利用webgrid列属性向导关联编辑控件 和webgrid中的列。

Infragistics NetAdvantage 组件说明 WebGrid(四) 样式和格式

UltraWebGrid加载许多不同的样式对象,每 个样式对象有自己的属性, 一些Style有相对应的default属性(对象?) 比如:HeaderStyleDefault、 RowStyleDefault、 RowAlternateStyleDefault 常用属性: Backcolor,BackGroundImage,BorderColor,BorderStyle,BorderWidth,Cursor,Font,ForeColor,Height,Width,Margin,Padding,HorizongtalAlign,VerticalAlgin,warp, Ø 创建和应用样式 Dim style as GridItemStyle style = new GridItemStyle() style.BackColor = System.Drawing.Color.Red style.ForeColor = System.Drawing.Color.White style.BorderStyle = BorderStyle.Groove style.BorderWidth = New Unit(“3px”) style.BackgroundImage = “images/landscape.jpg” style.Font.Bold = true UltraWebGrid1.DisplayLayout.AddNewBox.Style = style 也可以直接设置 UltraWebGrid1.DisplayLayout.RowSelectorStyleDefault.BackColor = System.Drawing.Color.Red 设置表头样式 UltraWebGrid1.DisplayLayout.HeaderStyleDefault.CssClass = “TD_Header” 隐藏Row Select Me.UltraWebGrid1.DisplayLayout.RowSelectorsDefault = Infragistics.WebUI.UltraWebGrid.RowSelectors.No 隐藏cell超出部分,用省略号表示 UltraWebGrid1.DisplayLayout.RowStyleDefault.Wrap = False UltraWebGrid1.DisplayLayout.RowStyleDefault.TextOverflow = Infragistics.WebUI.UltraWebGrid.TextOverflow.Ellipsis 固定表头 UltraWebGrid1.DisplayLayout.StationaryMargins = Infragistics.WebUI.UltraWebGrid.StationaryMargins.HeaderAndFooter 根据Cell不同值显示不同样式 放置在UltraGridInitializeRow事件中 If e.Row.Cells.FromKey(“Subject”).Value = “Test” Then e.Row.Cells.FromKey(“Subject”).Style.BackColor = System.Drawing.Color.Red End If 固定某一列 UltraWebGrid1.DisplayLayout.UseFixedHeaders = True UltraWebGrid1.DisplayLayout.FixedHeaderIndicatorDefault = FixedHeaderIndicator.Button AddNewBox设置 UltraWebGrid1.DisplayLayout.AddNewBox.ButtonStyle.CssClass 设置button的样式 UltraWebGrid1.DisplayLayout.AddNewBox.ButtonStyle.Cursor 设置光标落在上面显示的样式 更新数据库

批量更新数据库,需要页面上有提交按钮

 设置webgrid Update

 1

 2. 设置default cell clickedit模式 3. 增加guid隐藏列,实现可以新增多行 4. 增加以下代码到InitializeLayout事件中 e.Layout.Bands(0).DataKeyField = “CustomerID”

本文来自CSDN博客,转载请标明出 处:http://blog.csdn.net/Jelly_tracy/archive/2010/06/22/5686535.aspx

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/185672.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • android sharedpreferences_android S

    android sharedpreferences_android Searly_suspend/late_resumeLCD显示屏是休眠了,触摸屏也休眠了,但是标准的Linux系统并没有进入休眠Android在标准的Linux休眠与唤醒机制上又加了一层,就是early_suspend/late_resume使用early_suspend()进行休眠的设备,它休眠的时刻早于其他设备,使用late_resume()唤醒的设备,它被唤醒的时刻要晚…

  • Java设计模式(三)之创建型模式:单例模式

    Java设计模式(三)之创建型模式:单例模式

  • Linux部署,并查看后台[通俗易懂]

    Linux部署,并查看后台[通俗易懂]工具1:Xftp6工具2:Xshell6用Xftp6将war包拷至Linux的Tomcat的webapp包下用Xshell6进入Tomcat的bin目标下,ll或者ls命令,可以看到很多命令;先进行Tomcat关闭操作(如果Tomcat已经启动):./shutdown.sh。然后进行Tomcat启动操作:./startup.sh。此时已经启动完毕,想看控制台日志的话:进入Tom…

  • SQL server 数据库 修改字段类型[通俗易懂]

    SQL server 数据库 修改字段类型[通俗易懂]altertable表名altercolumn字段名称类型notnull

  • 三极管饱和的判断「建议收藏」

    三极管饱和的判断「建议收藏」三极管是电流放大器件,决定三极管是否饱和取决于Ib和Ic的相对大小,通常来讲Ic/Ib>hfe时,三极管饱和。因此导出以下结论:1.如何判断饱和?判断饱和时应该求出基级最大饱和电流IBS,然后再根据实际的电路求出当前的基级电流,如果当前的基级电流大于基级最大饱和电流,则可判断电路此时处于饱和状态。2.饱和的条件:1.集电极和

  • 关于AjaxPro用法[通俗易懂]

    关于AjaxPro用法[通俗易懂]特点是前后台传输数据特别方便,可以直接跟后台方法进行访问,中间用数据JASON数据传输这一切她都已经帮你做了。一、配置AjaxPro:1.下载AjaxPro.2.dll并添加到工程里,如图:在web.config中添加注册信息在后台Page_Load注册下,如下图:这样就配置好了。二、后台代码:[AjaxPro.AjaxMethod]加上此标记,前台可以直接调用此方法三、

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号