91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

在winform項目中,使用Devexpress GridControl控件,可能會遇到需要凍結頭部幾行的需求,本項目實例可以幫到你。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?DevExpress.XtraVerticalGrid.Rows;
using?DevExpress.XtraEditors.Repository;
using?DevExpress.XtraGrid.Views.Grid;
using?DevExpress.XtraGrid.Views.base;
using?System.Reflection;
using?DevExpress.Data;

namespace?WindowsApplication134?{
????public?partial?class?Form1?:?Form?{
????????public?Form1()?{
????????????InitializeComponent();
????????}

????????private?void?Form1_Load(object?sender?EventArgs?e)?{
????????????//this.order_DetailsTableAdapter.Fill(this.nwindDataSet.Order_Details);
????????????this.oldTopRowIndex?=?gridView1.TopRowIndex;

????????????this.gridView1.OptionsView.RowAutoHeight?=?false;
????????????//this.gridView1.OptionsView.ShowHorzLines?=?false;
????????????//this.gridView1.OptionsView.ShowVertLines?=?false;
????????????//this.gridView1.OptionsView.ColumnAutoWidth?=?false;
????????????this.gridView1.OptionsView.ShowColumnHeaders?=?false;
????????????this.gridView1.OptionsView.ShowGroupPanel?=?false;
????????????this.gridView1.OptionsView.ShowIndicator?=?false;
????????????this.gridView1.OptionsBehavior.Editable?=?false;
????????????this.gridView1.OptionsSelection.EnableAppearanceFocusedRow?=?false;
????????????this.gridView1.OptionsSelection.EnableAppearanceFocusedCell?=?false;
????????}

????????const?int?FixedRowCount?=?1;

????????private?void?gridView1_CustomDrawCell(object?sender?DevExpress.XtraGrid.Views.base.RowCellCustomDrawEventArgs?e)?{
????????????GridView?view?=?sender?as?GridView;
????????????if(e.RowHandle?????????????Color?foreColorForFixedCells?=?Color.Red;
????????????int?visibleIndex?=?view.GetVisibleIndex(e.RowHandle)?-?view.TopRowIndex;
????????????if(visibleIndex?>=?0?&&?visibleIndex?????????????????//if(e.Column.SummaryItem.SummaryType?!=?SummaryItemType.None)
????????????????{
????????????????????string?displayText?=?e.Column.Name.ToString()?+?visibleIndex.ToString();
????????????????????//displayText??+=?“:?“?+?e.Column.SummaryItem.SummaryValue.ToString();
????????????????????e.Graphics.DrawString(displayText?e.Appearance.Font?new?SolidBrush(foreColorForFixedCells)?e.Bounds);
????????????????}
????????????????e.Handled?=?true;
????????????}
????????}
????????int?oldTopRowIndex?=?0;
????????private?void?gridView1_TopRowChanged(object?sender?EventArgs?e)?{
??????????????GridView?view?=?sender?as?GridView;
??????????????int?max?=?oldTopRowIndex?>?view.TopRowIndex???oldTopRowIndex?+?FixedRowCount?:?view.TopRowIndex?+?FixedRowCount;
??????????????for(int?i?=?view.TopRowIndex;?i???????????????????view.RefreshRow(i);
????????}

????????bool?IsFixedRow(int?rowHandle?GridView?view)?{
????????????if(rowHandle?>=?view.TopRowIndex?&&?rowHandle?????????????????return?true;
????????????return?false

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件????????387??2008-02-25?02:25??FixedRows\app.config

?????文件??????37376??2012-09-24?11:02??FixedRows\bin\Debug\FixedRows.exe

?????文件????????387??2008-02-25?02:25??FixedRows\bin\Debug\FixedRows.exe.config

?????文件??????69120??2012-09-24?11:02??FixedRows\bin\Debug\FixedRows.pdb

?????文件??????11608??2012-09-24?11:02??FixedRows\bin\Debug\FixedRows.vshost.exe

?????文件????????387??2008-02-25?02:25??FixedRows\bin\Debug\FixedRows.vshost.exe.config

?????文件????????931??2011-12-08?20:52??FixedRows\FixedRows.sln

????..A..H.?????26112??2012-09-24?11:02??FixedRows\FixedRows.suo

?????文件???????4084??2012-09-24?11:02??FixedRows\Form1.cs

?????文件???????6530??2012-09-24?10:53??FixedRows\Form1.Designer.cs

?????文件???????6442??2012-09-24?10:53??FixedRows\Form1.resx

?????文件??????69434??2011-12-08?20:52??FixedRows\nwindDataSet.Designer.cs

?????文件??????????3??2008-02-25?02:25??FixedRows\nwindDataSet.xsc

?????文件??????16000??2008-02-25?02:25??FixedRows\nwindDataSet.xsd

?????文件??????????3??2008-02-25?02:25??FixedRows\nwindDataSet.xss

?????文件??????????0??2012-09-24?10:36??FixedRows\obj\Debug\build.force

?????文件??????66840??2012-09-24?10:51??FixedRows\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6356??2012-09-24?11:02??FixedRows\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件??????37376??2012-09-24?11:02??FixedRows\obj\Debug\FixedRows.exe

?????文件??????69120??2012-09-24?11:02??FixedRows\obj\Debug\FixedRows.pdb

?????文件????????180??2012-09-24?10:52??FixedRows\obj\Debug\FixedRows.Properties.Resources.resources

?????文件????????406??2012-09-24?10:54??FixedRows\obj\Debug\GenerateResource-ResGen.read.1.tlog

?????文件????????610??2012-09-24?10:54??FixedRows\obj\Debug\GenerateResource-ResGen.write.1.tlog

?????文件??????28672??2012-09-24?10:33??FixedRows\obj\Debug\TempPE\nwindDataSet.Designer.cs.dll

?????文件???????5120??2012-09-24?10:33??FixedRows\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件???????1787??2012-09-24?11:02??FixedRows\obj\Debug\WindowsApplication134.csproj.FileListAbsolute.txt

?????文件????????180??2012-09-24?10:54??FixedRows\obj\Debug\WindowsApplication134.Form1.resources

?????文件????????473??2008-02-25?01:31??FixedRows\Program.cs

?????文件???????1292??2008-02-25?01:31??FixedRows\Properties\AssemblyInfo.cs

?????文件????????245??2012-09-24?11:02??FixedRows\Properties\licenses.licx

............此處省略25個文件信息

評論

共有 條評論