首页 新闻 会员 周边 捐助

Devexpress pivotgridcontrol显示数据

0
悬赏园豆:40 [已关闭问题] 关闭于 2012-07-12 14:05

我想对接收功率值为2.77的进行特殊显示,代码是按api写的,程序运行无错,但是不起作用,如何解决? 

private void Form1_Load(object sender, EventArgs e)         {              string selectstr = string.Format("SELECT phonenum as '终端号',rssi as '信号强度' FROM dbo.SONDemoSystemTable");             using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["sondemosystem"].ConnectionString))             {                 con.Open();                 SqlDataAdapter adapter = new SqlDataAdapter(selectstr, con);                 DataSet sourceDataSet = new DataSet();                 adapter.Fill(sourceDataSet, "SONDemoSystemTable");                 pivotGridControl1.DataSource = sourceDataSet.Tables["SONDemoSystemTable"];                 PivotGridField fieldPhone = new PivotGridField("终端号", PivotArea.FilterArea);                 PivotGridField fieldReceivePower = new PivotGridField("接收功率", PivotArea.FilterArea);    pivotGridControl1.Fields.AddRange(new PivotGridField[] {fieldPhone,fieldReceivePower });              

                PivotGridStyleFormatCondition fCondition = new PivotGridStyleFormatCondition();                fCondition.Field = fieldReceivePower;                fCondition.ApplyToCustomTotalCell = false;                fCondition.ApplyToGrandTotalCell = false;                fCondition.ApplyToTotalCell = false;                fCondition.Condition = DevExpress.XtraGrid.FormatConditionEnum.Equal;                             fCondition.Value1 = 2.77;                fCondition.Appearance.BackColor = Color.Red;                fCondition.Appearance.Font = new Font(fCondition.Appearance.Font, FontStyle.Bold);                fCondition.Appearance.Options.UseBackColor = true;                fCondition.Appearance.Options.UseFont = true;                             pivotGridControl1.FormatConditions.AddRange(new DevExpress.XtraPivotGrid.PivotGridStyleFormatCondition[] { fCondition });          } }

ttssrs的主页 ttssrs | 初学一级 | 园豆:82
提问于:2011-11-21 17:40
< >
分享
所有回答(1)
0

程序没有错误,是运行后的操作失误。

ttssrs | 园豆:82 (初学一级) | 2012-07-12 14:05
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册