In the event handler of RecordExpanding, how do I get first cell's value?
Thanks!
Hello,
Have you tried :
(e.Record as DataRecord).Cells[0].Value
Alex.
Thanks Alex, but I got Error 1 'System.Windows.RoutedEventArgs' does not contain a definition for 'Record' and no extension method 'Record' accepting a first argument of type 'System.Windows.RoutedEventArgs' could be found (are you missing a using directive or an assembly reference?) C:\download\testColorLine\testColorLine\testColorLine\Window1.xaml.cs 70 25 testColorLineprivate
void expandingHandle(object sender, RoutedEventArgs e) { var xx = (e.Record as DataRecord).Cells[0];}Steve
Hello Steve,
First thing that comes in my mind is using the IsExpanded property of the record and bind it to it.
Alex, But I can't find IsExpanded property under XamDataGrid.
Thanks!Steve
It is a property of the Record
Hi AlexCould you pelase porvide more info how to do bind to Record's property or provide a simple sample?Thanks!Steve
Perhaps it is better to take a look at Josh Smith's blog
http://joshsmithonwpf.wordpress.com/ and his article about it here:
http://msdn.microsoft.com/en-us/magazine/dd419663.aspx