or
The QueryableDataServiceCollectionView seems have a dependency on System.Data.Services.Client v 4.0. The project is built agains WCF Data Services October 2011 CTP and references Microsoft.Data.Services.Client from CTP folder. I tried to trick it with binding redirect, but it didn't work.
My version of the controls is 2011.3.1220.35. What version of WCF Data Services is supported?
-Stan
<
Style
TargetType
=
"{x:Type TextBox}"
>
<
Setter
Property
=
"Background"
Value
=
"{DynamicResource UnfocusedBackground}"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"{DynamicResource ControlBorder}"
/>
<
Setter
Property
=
"Foreground"
Value
=
"{DynamicResource UnfocusedForeground}"
/>
<
Style.Triggers
>
<
Trigger
Property
=
"IsFocused"
Value
=
"True"
>
<
Setter
Property
=
"Background"
Value
=
"{DynamicResource FocusedBackground}"
/>
<
Setter
Property
=
"Foreground"
Value
=
"{DynamicResource FocusedForeground}"
/>
</
Trigger
>
</
Style.Triggers
>
</
Style
>
I had to create a custom column generator with additional logic. It uses reflection to retrieve information about required fields and generates columns.
var gridColumn = new Telerik.Windows.Controls.GridViewDataColumn {
Header = attributes[0].Header, IsVisible = attributes[0].IsVisible,
UniqueName = property.Name,
DataMemberBinding = new Binding(string.Format("Item.{0}", property.Name)),
}It works perfectly except grouping and sorting. However I turned on, that user can sort, and the
grid is groupable and sortable.this.InternalGrid.GroupDescriptors.Add(new Telerik.Windows.Controls.GridView.ColumnGroupDescriptor()
{ Column = this.InternalGrid.Columns[1] });
Grouping seems to be working, it adds the correct column to the group panel, however there is only one group
which contains all of the rows. Sorting is working alike, indicator shows the correct sorting option but nothing
happens. What am I missing here?
<
telerik:RadDataPager
Grid.Row
=
"3"
x:Name
=
"radDataPager"
Source
=
"{Binding SearchResults}"
PageSize
=
"5"
DisplayMode
=
"All"
IsTotalItemCountFixed
=
"True"
/>
<
telerik:RadGridView
x:Name
=
"grdSearchResults"
Grid.Row
=
"4"
ItemsSource
=
"{Binding PagedSource, ElementName=radDataPager}"
IsBusy
=
"{Binding IsSearchActive}"
IsReadOnly
=
"True"
CanUserDeleteRows
=
"False"
CanUserInsertRows
=
"False"
ShowGroupPanel
=
"False"
Width
=
"auto"
AutoGenerateColumns
=
"False"
ReorderColumnsMode
=
"Interactive"
RowIndicatorVisibility
=
"Collapsed"
AutoExpandGroups
=
"True"
SelectionMode
=
"Extended"
>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:GroupDescriptor
Member
=
"AccountNumber"
SortDirection
=
"Ascending"
/>
<
telerik:GroupDescriptor
Member
=
"DocumentType"
SortDirection
=
"Ascending"
/>
</
telerik:RadGridView.GroupDescriptors
>
<
i:Interaction.Behaviors
>
<
Behaviors:MultiSelectBehavior
SelectedItems
=
"{Binding SelectedDocuments}"
/>
</
i:Interaction.Behaviors
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"ID"
DataMemberBinding
=
"{Binding EntryId}"
/>
<
telerik:GridViewDataColumn
Header
=
"Status"
DataMemberBinding
=
"{Binding Status}"
/>
<
telerik:GridViewDataColumn
Header
=
"Created"
DataMemberBinding
=
"{Binding CreateDate}"
/>
<
telerik:GridViewSelectColumn
/>
</
telerik:RadGridView.Columns
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"RowActivated"
>
<
i:InvokeCommandAction
Command
=
"{Binding DisplayViewCommand}"
/>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
telerik:RadGridView
>