wpf - C# Datagrid has extra redundant column -


enter image description herei have strange problem while trying use datagrids in c# . column appened datagrid not neat .

i followed tutorials datagrid in wpf . downloaded example , executed them see in example column appended . ( figure 2 & figure 7 )

why ? can rid of redundant column ?

left panel :

    <dockpanel >         <textbox dockpanel.dock="top" text="unsecured devices" isreadonly="true"/>         <datagrid x:name="unsecure" itemssource="{binding unsecureddevices}"/>     </dockpanel> 

right panel :

    <dockpanel  grid.column="2">         <textbox dockpanel.dock="top" text="secured devices" isreadonly="true" />         <datagrid x:name="secure" itemssource="{binding secureddevices}" />     </dockpanel> 

its not empty column empty space left over, can fix setting columnwidth on datagrids

auto unit of measure based on size of cells , column header.

pixel unit of measure expressed in pixels.

sizetocells unit of measure based on size of cells.

sizetoheader unit of measure based on size of column header.

star unit of measure weighted proportion of available space.

i think star(*) work layout <datagrid columnwidth="*">


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -