日期:2014-05-20 浏览次数:20829 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.BandedGrid;
using bll = PowerData.Mobile.BLL;
namespace PowerData.Mobile.UI.CompanySearch
{
public partial class UCNine : UCBase
{
public UCNine()
{
InitializeComponent();
}
/// <summary>
/// 重写父类方法
/// </summary>
/// <param name="strEnt_Id"></param>
/// <param name="strDate"></param>
public override void LoadInfo(string strEnt_Id, string strDate)
{
InitGrid(strEnt_Id, strDate);
}
///初始化表格
private void InitGrid(string strEnt_Id, string strDate)
{
using (DataTable dt = new bll.SewageDischarge().GetNine(strEnt_Id, strDate))
{
BandedGridView view = advBandedGridView1 as BandedGridView;
view.BeginUpdate(); //开始视图的编辑,防止触发其他事件
view.BeginDataUpdate(); //开始数据的编辑
view.Bands.Clear();
//修改附加选项
view.OptionsView.ShowColumnHeaders = false;
view.OptionsView.ShowGroupPanel = false;
view.OptionsView.EnableAppearanceEvenRow = false;
view.OptionsCustomization.AllowColumnMoving = false;