
软件包中附带FlexCell表格设计器,无需任何编程就可以制作出图文并茂的报表和程序界面,还可作为B/S报表工具使用。
1)绑定相关的汇总数据
Dictionary<string, CListItem>dict = GetAgeCondition()
if (dict.Keys.Count >0)
{
grid1.Cell(startRow++, 1).Text = "年龄段情况:"
foreach (string key in dict.Keys)
{
CListItem item = dict[key]
grid1.Cell(startRow, 2).Text = key
grid1.Cell(startRow, 3).Text = string.Format("有{0}人,占比例{1} ", item.Text, item.Value)
grid1.Cell(startRow, 4).Text = string.Format("Age:{0}", key)
startRow++
}
}
2)超链接处理事件代码
在控件上单击Grid的Hyperlink处理事件,然后实现其内部处理代码,如下所示:
private void grid1_HyperLinkClick(object Sender, FlexCell.Grid.HyperLinkClickEventArgs e)
{
FlexCell.Cell cell = grid1.Cell(e.Row, 4)
if (cell != null &&!string.IsNullOrEmpty(cell.Text))
{
FrmStatisticDetail dlg = new FrmStatisticDetail()
dlg.KeyCondition = cell.Text
dlg.ShowDialog()
}
e.URL = ""
e.Changed = true
}
在控件上单击Grid的Hyperlink处理事件,然后实现其内部处理代码,如下所示:private void grid1_HyperLinkClick(object Sender, FlexCell.Grid.HyperLinkClickEventArgs e)
{
FlexCell.Cell cell = grid1.Cell(e.Row, 4)
if (cell != null &&!string.IsNullOrEmpty(cell.Text))
{
FrmStatisticDetail dlg = new FrmStatisticDetail()
dlg.KeyCondition = cell.Text
dlg.ShowDialog()
}
e.URL = ""
e.Changed = true
}
你没有看我说的<<<<<<千万注意>>>>>>>吧不但要调z-index:999,还要设置背景色
这问题我遇到过,以前是用一个iframe放到菜单的下面,来摭住其它所有内容
如果有疑问,可以去看看我的百度空间中,我的js菜单是如何写的,上面就没有用到iframe,只是设置了background-color:white
那你的菜单的style要改改
style = "z-index:999background-color:white"
千万要注意,background-color一定要设置,要不然就不会在最上面,因为不设置,div的默认背景是透明的
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)