I would like to display data in panel below the datagrid when user changes selected row by using mouse or arrow keys.
Microsoft datagrid has event "SelectionChanged " works great. but with XamWebGrid, I don't how to do it.
I tried using "SelectedRowsCollectionChanged" event, but I get following error.
_dgSOMaster.SelectedRowsCollectionChanged +=
new EventHandler<Infragistics.Silverlight.SelectionCollectionChangedEventArgs<SelectedRowsCollection>>(_dgSOMaster_SelectedRowsCollectionChanged);
Error 1 The type 'Infragistics.Silverlight.Controls.SelectedRowsCollection' cannot be used as type parameter 'T' in the generic type or method 'Infragistics.Silverlight.SelectionCollectionChangedEventArgs<T>'. There is no implicit reference conversion from 'Infragistics.Silverlight.Controls.SelectedRowsCollection' to 'System.Collections.IEnumerable'. C:\Users\azr\work\appshell\ProcessViewer\SOMaint\View\UserGridView.xaml.cs 58 136 SOMaint
Sorry, new to Silverlight Infragistics control.
Thanks in advance.
Thanks for your help & time. That did a trick.
This exception could be probably caused by a missing reference to the Infragistics.Silverlight.v9.1 assembly. Let me know if you can resolve this with adding a reference to this assembly in your project and also if the issue remains .
Regards Vlad
I am really sorry, but it's automatically generated by Visual studio by pressing TAB. Here is the complete code.
// Event Handler code
{
throw new NotImplementedException();
}
Compile Errors:
Error 1 The type 'Infragistics.Silverlight.Controls.SelectedRowsCollection' cannot be used as type parameter 'T' in the generic type or method 'Infragistics.Silverlight.SelectionCollectionChangedEventArgs<T>'. There is no implicit reference conversion from 'Infragistics.Silverlight.Controls.SelectedRowsCollection' to 'System.Collections.IEnumerable'. C:\Users\azr\work\appshell\ProcessViewer\SOMaint\View\UserGridView.xaml.cs 65 14 SOMaint
Error 2 The type 'Infragistics.Silverlight.CollectionBase`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Infragistics.Silverlight.v9.1, Version=9.1.20091.1006, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb'. C:\Users\azr\work\appshell\ProcessViewer\SOMaint\View\UserGridView.xaml.cs 65 14 SOMaint
Hello,
I am assuming that the exception is coming from inside this event handler. You are trying to cast the SelectedRowsCollection to a IEnumerable collection implicitly which is not possible? You have to use some of the following methods - ToArray(), ToList(), ToDictionary() etc.
Please let us know how you are trying to cast the SelectedRowsCollection and if these methods are helpful?