c# - CaliburnMicro + RowDetailsTemplate: Details-View disappears -


i have gridview lists products. first column "gridviewtogglerowdetailscolumn" expands details-view when clicked.

i use caliburnmicro load details-view so:

 <telerik:radgridview itemssource="{binding products.view}"                              selecteditem="{binding selectedproduct,mode=twoway,updatesourcetrigger=propertychanged}"                              autogeneratecolumns="false"                                                               enablerowvirtualization="false"                              showgrouppanel="false"                              rowdetailsvisibilitymode="collapsed"                              rowindicatorvisibility="collapsed"                              cal:message.attach="[event rowdetailsvisibilitychanged] =  [action onrowdetailsvisibilitychanged($eventargs)]">  <telerik:radgridview.rowdetailstemplate>   <datatemplate>       <contentcontrol cal:view.model="{binding datacontext.productdetailsviewmodel, relativesource={relativesource findancestor, ancestortype=telerik:radgridview}}" />   </datatemplate> </telerik:radgridview.rowdetailstemplate>    <telerik:gridviewtogglerowdetailscolumn />      ...columndefinitions...  </telerik:radgridview> 

i can open , close details long stay on same product. problem occurs if open details while details visible. details of first disappears , never comes back. see screenshot: image

the grey box placeholder details. opened details of first 8 items 1 after another, last 1 showing. guess caliburn micro can not locate view anymore, have no idea why? because have 1 productdetailsviewmodel?

also: in debug mode noticed "productdetailsviewmodel"-getter accessed once per item after expanding row. collapsing , expanding same row not access getter again.

update: approach, same effect: itemssource collection of productdetailsviewmodel , inherit mainviewmodel conductor<productdetailsviewmodel>.collection.oneactive, make grid binding with

itemssource = "{binding items}" 

and in xaml

<contentcontrol cal:view.model="{binding datacontext.activeitem, relativesource={relativesource findancestor, ancestortype=telerik:radgridview}}" /> 

in selectionchanged do

activateitem(e.row.item productdetailsviewmodel); 

same before, productdetailsview displayed current item, disappears once show details of product.

the problem view-caching of "iviewaware", automatically implemented screens. overwriting "getview" in productdetailsviewmodel solved issue.

related: screens shared in multiple screens disappear after deactivation in caliburn.micro


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -