<grid
>
<
dxg:gridcontrol
name
="griderrorsinfo"
autopopulatecolumns
="true"
showborder
="false"
showloadingpanel
="false"
horizontalalignment
="stretch"
verticalalignment
="stretch"
allowcolumnmrufilterlist
="false"
allowmrufilterlist
="false"
margin
="0,0,4,28"
mousedoubleclick
="griderrorsinfo_mousedoubleclick"
>
<
dxg:gridcontrol.columns
>
<
dxg:gridcolumn
name
="num"
fieldname
="num"
header
="num"
width
="100"
/>
<
dxg:gridcolumn
name
="pagename"
fieldname
="pagename"
header
="name"
width
="150"
/>
<
dxg:gridcolumn
name
="errors"
fieldname
="errordetail"
width
="auto"
header
="megs"
/>
dxg:gridcontrol.columns
>
<
dxg:gridcontrol.view
>
<
dxg:tableview
name
="errorviewlist"
autowidth
="true"
allowmovecolumntodroparea
="false"
/>
dxg:gridcontrol.view
>
dxg:gridcontrol
>
grid
>
上面**裡面最主要的就是上面的這兩句。注意:此處,如果你需要,每一列的列寬不一樣,就將每一列設定乙個寬度。上面的最後一列的width設定乙個值即可。
<datagrid
autogeneratecolumns
="false"
height
="190"
horizontalalignment
="left"
margin
="2,5,0,0"
name
="datachartsingle"
verticalalignment
="top"
width
="225"
isreadonly
="true"
>
<
datagrid.columns
>
<
datagridtextcolumn
header
="varnumber"
binding=""
width
="130"
canusersort
="false"
canuserresize
="true"
/>
<
datagridtextcolumn
header
="maxvar"
binding=""
width
="48"
canusersort
="false"
canuserresize
="true"
/>
<
datagridtextcolumn
header
="minvar"
binding=""
width
="*"
canusersort
="false"
canuserresize
="true"
/>
datagrid.columns
>
datagrid
>
在datagrid裡面就很好解決了,只需要在最後一列裡面的width設定時,設定為 width="*" 最後一列就會自動填充滿。
GridControl常用屬性
this.gridview1.optionsview.showcolumnheaders true 顯示列標題 this.gridview1.optionsview.showindicator true 顯示行標題 this.gridview1.indicatorwidth 40 行標題寬度 顯示行...
GridControl常用設定
清空gridcontrol的drag a column header here說明 gridview1.optionsview.showgrouppanel false gridview 序列寬度設定 indicatorwidth 40 gridcontrol列的寬度根據資料自動填充 1.在填充完資...
GridControl控制項應用
gridcontrol控制項是dev express外掛程式帶的類似於c 內部winform控制項gridview控制項,內部必須新增gridview,同乙個control可以新增多個view datetable型別的資料,新增編號和名稱兩列,將伺服器中查詢到的內容新增到 中 gridcontrol...