Wpf datagrid ctp cell selection changed causes sometimes no CurrentChanged event

W

Winfried Wille

Hallo,

i have a wpf project using nt 3.5sp1 and the ctp from the
datagrid(downloaded thewpftoolkit from codeplex.com), silverlight final
downloads are installed to.
Wpf datagrid ctp cell selection changed causes sometimes no CurrentChanged
event - cells are in different rows.
If you click in the rowheader, the CurrentChanged event always occur, the
CurrentChanging event exhibits the same behavior.
A Textbox bind to the CurrentItem of the Datadgrid changes always its
content, when a cell change spanning rows occurs.
Some code:

<TabItem Name="pnlMails" Header="Mails">
---
<dg:DataGrid x:Name="dgMails" AutoGenerateColumns="false"
HeadersVisibility="All" SelectionUnit="CellOrRowHeader" Grid.Row="0"
Grid.Column="0" Grid.ColumnSpan="2" CanUserAddRows="false"
ItemsSource="{Binding}" SelectionChanged="dgMails_SelectionChanged"
IsSynchronizedWithCurrentItem="True"
VerticalScrollBarVisibility="Disabled"
RowHeight="20" ColumnHeaderHeight="20">
<dg:DataGrid.Columns>
....
<TextBox Name="txtRawMessage" Grid.Row="1" Text="{Binding
Path=CurrentItem.RawMessage, ElementName=dgMails }"/>

pnlMails.DataContext = m.LoadMails2(skip, take, out count);
view = (ICollectionView)(dgMails.Items);
view.CurrentChanged += new
EventHandler(View_CurrentChanged);

LoadMails2 returns a IQueryable<Mail>.

Question is there a workaround or is it fixed in the datagrid released with
silverlight (if how can i use it).
I could implement a CurrentCellChanged eventhandler, remember the last item
and fire my code there - but wanna be sure this workaround is needed.

Code is here http://w2ww.de/downloads/exchangegui081017.zip (less than 1
MB).

Regards
Winfried Wille
 
Top