This question is locked. New answers and comments are not allowed.
Greetings Telerik Team!
Running an SL4 app with Telerik Q1 2011 toolkit with Mvvm Light
I had been using a dataform/radGridView together with an ObservableCollection which, among other things, was giving me design time data in blend. I wanted to include a datapager, and switched to a QueryableCollectionView bound to the itemssource/source of my dataform/radgridview/raddatapager. Upon doing so, I could no longer see my design time data in blend.
I'm using a service interface which implements a base class that uses the DesignerProperties.IsInDesignTool property to determine whether I should return a design time service or my run time web service.
Is the QCV not blendable?
Here's my ViewModel
View:
Running an SL4 app with Telerik Q1 2011 toolkit with Mvvm Light
I had been using a dataform/radGridView together with an ObservableCollection which, among other things, was giving me design time data in blend. I wanted to include a datapager, and switched to a QueryableCollectionView bound to the itemssource/source of my dataform/radgridview/raddatapager. Upon doing so, I could no longer see my design time data in blend.
I'm using a service interface which implements a base class that uses the DesignerProperties.IsInDesignTool property to determine whether I should return a design time service or my run time web service.
Is the QCV not blendable?
Here's my ViewModel
public
void
LoadAccounts()
{
Accounts =
null
;
AccountService.GetAccounts(App.CurrentUser.ToString(), GetAccountsCallback);
}
private
void
GetAccountsCallback(ObservableCollection<TSMVVM.Model.Accounts> accounts)
{
if
(accounts !=
null
)
{
if
(accounts.Count > 0) {
Accounts =
new
QueryableCollectionView(accounts)
SelectedAccount =
null
;
}
}
private
QueryableCollectionView _accounts;
public
QueryableCollectionView Accounts
{
get
{
return
_accounts; }
set
{
_accounts = value;
RaisePropertyChanged(
"Accounts"
);
}
}
View:
<
toolkit:DataForm
x:Name
=
"dataForm"
Header
=
"Account Definition"
Width
=
"{Binding Width, ElementName=GV1}"
ItemsSource
=
"{Binding Accounts}"
CurrentItem
=
"{Binding SelectedAccount}"
AutoEdit
=
"False"
AutoGenerateFields
=
"False"
AutoCommit
=
"False"
Margin
=
"0,0,0,10"
>
</
toolkit:DataForm
>
<
telerik:RadGridView
ItemsSource
=
"{Binding Accounts}"
x:Name
=
"GV1"
ShowGroupPanel
=
"False"
DataLoadMode
=
"Asynchronous"
HorizontalAlignment
=
"Left"
HeaderRowStyle
=
"{StaticResource CSAgvHeaderRowStyle}"
SelectedItem
=
"{Binding SelectedAccount, Mode=TwoWay}"
AutoGenerateColumns
=
"False"
IsReadOnly
=
"True"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
HeaderCellStyle
=
"{StaticResource CSAgvHeaderCellStyle}"
DataMemberBinding
=
"{Binding AccountNumber}"
/>
<
telerik:GridViewDataColumn
HeaderCellStyle
=
"{StaticResource CSAgvHeaderCellStyle}"
DataMemberBinding
=
"{Binding AccountDescription}"
Width
=
"*"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<
telerik:RadDataPager
Grid.Row
=
"1"
Source
=
"{Binding Accounts}"
PageSize
=
"10"
/>