zoukankan      html  css  js  c++  java
  • Silverlight Visifire控件 .net后台控制aspx页面控件的显示与隐藏,动态给控件赋值,选定默认值的设定

    .net后台代码:

    控件的显示与隐藏:

     this.dateStart.Visibility = Visibility.Collapsed;//不显示控件
     this.dateYear.Visibility = Visibility.Visible;//显示控件

    设置控件位置:

    this.oildomName.Margin = new Thickness(167, 12, 0, 0);
    this.oildomNameList.Margin = new Thickness(212, 12, 0, 0);
    this.btnQuery.Margin = new Thickness(322, 12, 0, 0);
    this.btnBack.Margin = new Thickness(407, 12, 0, 0);

     控件赋值,选定值的设定:

     for (int ii = DateTime.Today.Year; ii >= 1980; ii--)
     {
                        string item = string.Format("{0}年", ii.ToString());
                        // this.dateYear.Items.Add(item);
                        if (item != sClickReportDate)
                        {
                            this.dateYear.Items.Add(item);
                        }
                        else
                        {
                            ComboBoxItem cbi1 = new ComboBoxItem();
                            cbi1.SetValue(ComboBoxItem.ContentProperty, sClickReportDate);
                            this.dateYear.Items.Add(cbi1);
                            //下拉框赋选定值
                            this.dateYear.SelectedItem = cbi1;
                        }
    }

  • 相关阅读:
    sqlnet设置网络传输加密
    临时表处理办法
    分布式事务2PC_PENDING异常处理
    统计信息收集百分比和并行改变
    dataguard丢失归档日志处理
    patch 28729262
    Cardinality
    统计信息不准导致sql性能下降
    子查询展开
    ogg 单表拆分合并进程
  • 原文地址:https://www.cnblogs.com/xuxin-1989/p/3593432.html
Copyright © 2011-2022 走看看