We just got the WPF package last week, so it should be the latest release.
We've set up a basic GridView, but it doesn't allow us to sort the columns.
The XAML looks like this:
I've tried setting a SortMemberPath on the columns, but that doesn't buy me any ground. I looked over the GridView documentation on sorting, but I didn't notice anything out of place.
My colleague set up the attached behavior at the bottom. I may have misheard him, but I believe he said he pulled it from these forums, posted from your team. Basically, we needed to know when the user double-clicked a row, and that does it for us. I tried removing it as well (just in case it was causing the problem), but it didn't change anything.
Thanks!
We've set up a basic GridView, but it doesn't allow us to sort the columns.
The XAML looks like this:
<
telerik:RadGridView
HorizontalAlignment
=
"Stretch"
Margin
=
"10,10,10,0"
x:Name
=
"ProjectGrid"
VerticalAlignment
=
"Stretch"
AutoGenerateColumns
=
"False"
AlternateRowBackground
=
"#FFEEEEEE"
RowIndicatorVisibility
=
"Collapsed"
CanUserSortColumns
=
"True"
IsReadOnly
=
"True"
CanUserFreezeColumns
=
"False"
SelectionUnit
=
"FullRow"
CanUserResizeColumns
=
"False"
IsFilteringAllowed
=
"True"
ItemsSource
=
"{Binding Path=CurrentUser.Quotes, Source={StaticResource applicationViewModel}}"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Project Date"
Width
=
".15*"
DataMemberBinding
=
"{Binding Path=ProjectDate}"
DataFormatString
=
"{}{0:MM/dd/yyyy}"
/>
<
telerik:GridViewDataColumn
Header
=
"Customer"
Width
=
".2*"
DataMemberBinding
=
"{Binding Path=CustomerName}"
/>
<
telerik:GridViewDataColumn
Header
=
"PO #"
Width
=
".1*"
DataMemberBinding
=
"{Binding Path=POnumber}"
/>
<
telerik:GridViewDataColumn
Header
=
"Quote #"
Width
=
".1*"
DataMemberBinding
=
"{Binding Path=QuoteNumber}"
/>
<
telerik:GridViewDataColumn
Header
=
"Quote Type"
Width
=
".15*"
DataMemberBinding
=
"{Binding Path=QuoteType.Description}"
/>
<
telerik:GridViewDataColumn
Header
=
"User"
Width
=
".2*"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding Path=User.FirstName}"
Width
=
"Auto"
></
TextBlock
>
<
TextBlock
Text
=
"{Binding Path=User.LastName}"
Margin
=
"5,0,0,0"
Width
=
"Auto"
></
TextBlock
>
</
StackPanel
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
Header
=
"Items"
Width
=
".1*"
DataMemberBinding
=
"{Binding QuoteProducts.Count}"
/>
</
telerik:RadGridView.Columns
>
<
mcmds:CommandBehaviorCollection.Behaviors
>
<
mcmds:BehaviorBinding
Event
=
"MouseDoubleClick"
Command
=
"{Binding DoubleClick}"
CommandParameter
=
"{Binding SelectedItem, ElementName=ProjectGrid}"
/>
</
mcmds:CommandBehaviorCollection.Behaviors
>
</
telerik:RadGridView
>
I've tried setting a SortMemberPath on the columns, but that doesn't buy me any ground. I looked over the GridView documentation on sorting, but I didn't notice anything out of place.
My colleague set up the attached behavior at the bottom. I may have misheard him, but I believe he said he pulled it from these forums, posted from your team. Basically, we needed to know when the user double-clicked a row, and that does it for us. I tried removing it as well (just in case it was causing the problem), but it didn't change anything.
Thanks!