NetAdvantage For .NET常见技术问题集锦(一)

来源:互联网 发布:linux cd命令切换目录 编辑:程序博客网 时间:2024/05/01 04:04

1.      webdatechooser为空时默认值为NULL,如何修改显示不是Null

this.WebDateChooser1.NullDateLabel = "";

 

2.      当单元格是超连接的时候,如何点击超连接弹出一个窗口

设置TargetURL = "JavaScript:window.showModalDialog('页面地址',null,'dialogWidth:450px;dialogHeight:300px;center:yes;status:no;resizable:yes;');"

 

 3.当使用WebChart设置图表上轴label之间的间隔通过下面的方法来实现:

     this.UltraChart1.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval;

     this.UltraChart1.Axis.X.TickmarkInterval=(设置label之间的间隔,double 类型)

 

 4要去掉线上的点可以通过下面的代码来实现:

 

this.UltraChart1.LineChart.MidPointAnchors = false;

 

 5. 如何遍历整个表格

    foreach (UltraGridRow row in this.UltraGrid1.Rows.GetRowEnumerator(GridRowType.DataRow, null, null))

            {

                // Write code to process the row

                if (row.Cells[“您的checkbox列的索引”].Text == "true")

                {

                   //然后取该行相应单元格的值

                   String text= Row.Cells[“您想取值的列的索引”].Text;

                }

            }

 

6.循环访问子表

 UltraGridBand band = this.ultraGrid1.DisplayLayout.Bands[1];
 
foreach (UltraGridRow row in band.GetRowEnumerator(GridRowType.DataRow))
{
               // Write code to process the row
}
 

7:如何隐藏字表表头

e.Layout.Bands[1].ColHeadersVisible=false;

原创粉丝点击