c# - DataGrid columns is not loaded at first time in WPF -
i tried fill datagrid view not working first time.
in datagrid view columns not updated. first time datagrid column 0 , second time column count updated correctly.
//_dtsource nothing dataview dgrid.itemssource = _dtsource; dgrid.columns[0].visibility = visibility.visible; dgrid.columns[1].visibility = visibility.visible; dgrid.columns[2].visibility = visibility.hidden;
xaml code :
<grid height="642" width="835"> <textblock horizontalalignment="left" margin="283,10,0,0" textwrapping="wrap" text="access permissions" verticalalignment="top" width="200" height="23" fontsize="14" fontweight="bold"/> <textblock horizontalalignment="left" margin="10,68,0,0" textwrapping="wrap" text="list of forms :" verticalalignment="top" width="100" height="23"/> <datagrid x:name="dgrid" horizontalalignment="left" margin="10,111,0,0" verticalalignment="top" width="815" height="353" background="transparent" borderthickness="1" selectionchanged="dgrid_selectionchanged" autogeneratecolumns="false"/> </grid>
Comments
Post a Comment