DevExpress.XtraGrid常用設置

Q:DevExpress.XtraGrid中去掉表頭的"Drag a column header here to group by that column"
A:屬性—OptionsView—ShowGroupPanel,設置爲False

Q:DevExpress.XtraGrid表頭不顯示過濾框
A:屬性—OptionsView—ShowAutoFilterRow=false(如果無效,在form界面上點擊屬性—ShowAutoFilterRow=false)

Q:DevExpress.XtraGrid表頭顯示過濾框
A:屬性—OptionsView—ShowAutoFilterRow=true

Q:DevExpress.XtraGrid表格奇數和偶數行染色
A:屬性—OptionsView—EnableAppearanceEvenRow=true
屬性—OptionsView—EnableAppearanceOddRow=true

Q:DevExpress.XtraGrid表格奇數和偶數行屬性設置
A:屬性—Appearance—EvenRow
屬性—Appearance—OddRow

Q:DevExpress.XtraGrid表格只讀、是否允許編輯
A:OptionsColumn—AllowEdit = False, ReadOnly = True

Q:CheckedListBox候選項目點擊兩次才能選中
A:屬性—CheckOnClick,設置爲true

Q:GridView中日期格式的設置
A:屬性—DisplayFormat,將Format設置爲DateTime,將FormatString設置爲yyyy-MM-dd HH:mm

Q:去掉LayoutControlGroup四周的邊框
A:屬性—EnableIndentsWithoutBorders設置爲False

Q:GridView根據內容自動調整列寬
A:添加代碼 this.gridView1.BestFitColumns();

Q:GridView表格左側的序號寬度設置
A:屬性—IndicatorWidth

Q:GridView表格左側的序號不顯示
A:屬性—OptionsView—ShowIndicator = False


發佈了37 篇原創文章 · 獲贊 7 · 訪問量 6萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章