Wpf datagrid ctp cell selection changed causes sometimes no CurrentChanged event

  • Thread starter Thread starter Winfried Wille
  • Start date Start date
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top