i've created datagrid in datagrid.rowdetailstemplate , use items.refresh on when click on button created outside of datagrid.
i can't find way access function datagrid_detail button button_refreshdetail. here code :
<datagrid x:name="datagrid" horizontalalignment="left" height="618" margin="10,74,0,0" verticalalignment="top" width="1472" autogeneratecolumns="false" loadingrowdetails="datagrid_loadingrowdetails" canuseraddrows="false"> <datagrid.columns> <datagridtextcolumn header="a" binding="{binding a}" width="*"/> </datagrid.columns> <datagrid.rowdetailstemplate> <datatemplate> <datagrid x:name="datagrid_detail" itemssource="{binding b}" autogeneratecolumns="false" selectionchanged="datagrid_detail_selectionchanged" mouseleftbuttonup="datagrid_detail_mouseleftbuttonup"> <datagrid.columns> <datagridcheckboxcolumn header="c" binding="{binding c, mode=twoway}" isreadonly="false"/> <datagridtextcolumn header="d" binding="{binding d, mode=twoway}" isreadonly="false"/> <datagridcomboboxcolumn header="e" x:name="combobox_e"/> <datagridcomboboxcolumn header="f" x:name="combobox_f"/> <datagridtextcolumn header="g" binding="{binding g, mode=twoway}" isreadonly="false"/> <datagridcomboboxcolumn header="h" x:name="combobox_h"/> <datagridcomboboxcolumn header="i" x:name="combobox_i"/> <datagridtemplatecolumn width="45" header="j"> <datagridtemplatecolumn.celltemplate> <datatemplate> <image source="j.png" width="20" height="20"/> </datatemplate> </datagridtemplatecolumn.celltemplate> </datagridtemplatecolumn> </datagrid.columns> </datagrid> </datatemplate> </datagrid.rowdetailstemplate> </datagrid> <button x:name="button_refreshdetail" content="button_refreshdetail" horizontalalignment="left" height="26" margin="129,697,0,0" verticalalignment="top" width="118" click="button_refreshdetail"/> thank help.
couldn't use collection named "b" in order alter items?
if binding configured , mean :
- b
observablecollection
and every custom data type in collection
- implements
inotifypropertychanged
you should able update properties of each object or add/remove items collection , view updated no other code.
at least do. maybe not understanding refreshing scenario.
Comments
Post a Comment