wpf - How to get rid of display corruption during horizontal scroll in WPF4 DataGrid with grouping? -


i'm trying create datagrid grouping , i'm getting display corruption (blank areas) during horizontal scrolling. issue appears only when there groupstyle.containerstyle defined. datagrid should contain 200 rows or more reproduce problem.

update2: related microsoft connect feedback.

update: microsoft guy @ social.msdn.com pointed out adding grouping turns off datagrid virtualization. possibly that's root of problem. removed grouping sample , set virtualizingstackpanel.isvirtualizing false , got same kind of corruption.

code reproduce problem:

<datagrid itemssource="{binding source={staticresource resourcekey=cvsgoods}}"           canuseraddrows="false" canuserreordercolumns="false"           canuserdeleterows="false" canuserresizerows="false"           canusersortcolumns="false" autogeneratecolumns="true">     <datagrid.groupstyle>         <groupstyle>             <groupstyle.containerstyle>                 <style targettype="{x:type groupitem}">                     <setter property="template">                         <setter.value>                             <controltemplate targettype="{x:type groupitem}">                                 <itemspresenter  />                             </controltemplate>                         </setter.value>                     </setter>                 </style>             </groupstyle.containerstyle>         </groupstyle>     </datagrid.groupstyle> </datagrid> 

after several horizontal scrolls right , left blank areas appear on left side. tried on winxp , win7.

the question is: how rid of bug? there workaround? suggestions?

screenshot illustrating problem:

display corruption

we once faced same issue (but not same cause) i.e. datagrid have blank areas before first column of of rows. way solved (a hack) @ time disabling rowheader (don't know how solved problem did figure out blank areas rowheaders).

we disabled (correct word made size-zero) rowheader setting width zero, code below:

<wpftk:datagrid> ... ... <wpftk:datagrid.rowheaderstyle>     <style  targettype="wpftk:datagridrowheader" >         <setter property="width" value="0" />         <setter property="maxwidth" value="0" />     </style> </wpftk:datagrid.rowheaderstyle> ... ... </wpftk:datagrid> 

let me know if works in case.

one more thing noticed if either disable virtualization or rowheaderstyle, solve our problem. went disabling rowheader didn't need it.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -