This question is locked. New answers and comments are not allowed.
Hello
I have included the GridView in a lightswitch application as per the telerik sample at: http://www.telerik.com/products/silverlight/resources/lightswitch-support.aspx
The grid does not seem to be changing the Key (ID) when clicking on different rows. It seems to be staying with the first ID in the grid.
When I click on for example the third row and then on the Edit button it brings up the details of the first row in the grid.
The selected Item does not change.
Is there anything else that I need to configure?
I am using the following in my project:
I have included the GridView in a lightswitch application as per the telerik sample at: http://www.telerik.com/products/silverlight/resources/lightswitch-support.aspx
The grid does not seem to be changing the Key (ID) when clicking on different rows. It seems to be staying with the first ID in the grid.
When I click on for example the third row and then on the Edit button it brings up the details of the first row in the grid.
The selected Item does not change.
Is there anything else that I need to configure?
I am using the following in my project:
- Microsoft Visual Studio LightSwitch 2011
- RadControls for Silverlight Q2 2011
6 Answers, 1 is accepted
0
Hello John,
Please try the following setting for RadGridView :
Greetings,
Pavel Pavlov
the Telerik team
Please try the following setting for RadGridView :
IsSynchronizedWithCurrentItem="True" and let me know in case this does not make difference.
Greetings,
Pavel Pavlov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
John
Top achievements
Rank 1
answered on 30 Apr 2012, 12:22 PM
Hi Pavel
Unfortunately Still no joy after configuring that setting. (See attached proof of setting).
I have also now upgraded the project to use the latest Q1 2012 Silverlight controls.
Regards,
John
Unfortunately Still no joy after configuring that setting. (See attached proof of setting).
I have also now upgraded the project to use the latest Q1 2012 Silverlight controls.
Regards,
John
0
Hello John,
In such case I will need to see the relevant XAML and code behind ( cs or vb) . Also one thing you may check meanwhile is: Are there any binding expression errors in the output window of Visual Studio while you run the project.
Greetings,
Pavel Pavlov
the Telerik team
In such case I will need to see the relevant XAML and code behind ( cs or vb) . Also one thing you may check meanwhile is: Are there any binding expression errors in the output window of Visual Studio while you run the project.
Greetings,
Pavel Pavlov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
John
Top achievements
Rank 1
answered on 30 Apr 2012, 01:27 PM
I dont see any errors in the output window while running the project.
Included here is the code for the user control.
aml
Code behing C#
Included here is the code for the user control.
aml
<
UserControl
x:Class
=
"LightSwitchApplication.PortfolioRadGridControl"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
telerik:RadGridView
x:Name
=
"xRadGridView"
ItemsSource
=
"{Binding Screen.Portfolios, Mode=TwoWay}"
AutoGenerateColumns
=
"False"
IsSynchronizedWithCurrentItem
=
"True"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Header
=
"Id"
DataMemberBinding
=
"{Binding Id}"
/>
<
telerik:GridViewDataColumn
Header
=
"VerificationStatus"
DataMemberBinding
=
"{Binding VerificationStatus}"
/>
<
telerik:GridViewDataColumn
Header
=
"Is Available"
DataMemberBinding
=
"{Binding IsAvailable}"
/>
<
telerik:GridViewDataColumn
Header
=
"Display Order"
DataMemberBinding
=
"{Binding DisplayOrder}"
/>
<
telerik:GridViewDataColumn
Header
=
"Display Group"
DataMemberBinding
=
"{Binding DisplayGroup}"
/>
<
telerik:GridViewDataColumn
Header
=
"Portfolio Code"
DataMemberBinding
=
"{Binding PortfolioCode}"
/>
<
telerik:GridViewDataColumn
Header
=
"KAM Client Ref"
DataMemberBinding
=
"{Binding KAMClientRef}"
/>
<
telerik:GridViewDataColumn
Header
=
"Mandates"
DataMemberBinding
=
"{Binding Mandates}"
/>
<
telerik:GridViewDataColumn
Header
=
"Currency"
DataMemberBinding
=
"{Binding Currency}"
/>
<
telerik:GridViewDataColumn
Header
=
"Code If Not On KGV"
DataMemberBinding
=
"{Binding CodeIfNotOnKGV}"
/>
<
telerik:GridViewDataColumn
Header
=
"Notes"
DataMemberBinding
=
"{Binding Notes}"
/>
<
telerik:GridViewDataColumn
Header
=
"Notes"
DataMemberBinding
=
"{Binding Notes}"
/>
<
telerik:GridViewDataColumn
Header
=
"Time Horizon"
DataMemberBinding
=
"{Binding TimeHorizon}"
/>
<
telerik:GridViewDataColumn
Header
=
"Attitude To Risk"
DataMemberBinding
=
"{Binding AttitudeToRisk}"
/>
<
telerik:GridViewDataColumn
Header
=
"KAM Model"
DataMemberBinding
=
"{Binding KAMModel}"
/>
<
telerik:GridViewDataColumn
Header
=
"Income"
DataMemberBinding
=
"{Binding Income}"
/>
<
telerik:GridViewDataColumn
Header
=
"Management Fee"
DataMemberBinding
=
"{Binding MgtFee}"
/>
<
telerik:GridViewDataColumn
Header
=
"Per Trade Charge"
DataMemberBinding
=
"{Binding PerTradeCharge}"
/>
<
telerik:GridViewDataColumn
Header
=
"Performance Benchmark"
DataMemberBinding
=
"{Binding PerformanceBenchmark}"
/>
<
telerik:GridViewDataColumn
Header
=
"Date We Started Managing Portfolio"
DataMemberBinding
=
"{Binding DateWeStartedManagingPortfolio}"
/>
<
telerik:GridViewDataColumn
Header
=
"Value At Start Date"
DataMemberBinding
=
"{Binding ValueAtStartDate}"
/>
<
telerik:GridViewDataColumn
Header
=
"Date We Stopped Managing Portfolio"
DataMemberBinding
=
"{Binding DateWeStoppedManagingPortfolio}"
/>
<
telerik:GridViewDataColumn
Header
=
"Value At EndDate"
DataMemberBinding
=
"{Binding ValueAtEndDate}"
/>
<
telerik:GridViewDataColumn
Header
=
"Seperate Income Capital Accounts"
DataMemberBinding
=
"{Binding SeperateIncomeCapitalAccounts}"
/>
<
telerik:GridViewDataColumn
Header
=
"KAM Client Managers/Director"
DataMemberBinding
=
"{Binding KAMClientMgrDir}"
/>
<
telerik:GridViewDataColumn
Header
=
"KAM Investment Manager/Director"
DataMemberBinding
=
"{Binding KAMInvMgrDir}"
/>
<
telerik:GridViewDataColumn
Header
=
"IFA Broker Suitability Responsibility"
DataMemberBinding
=
"{Binding IFABrokerSuitabilityResponsibility}"
/>
<
telerik:GridViewDataColumn
Header
=
"Amount Of Fee Pay away"
DataMemberBinding
=
"{Binding AmountOfFeePayaway}"
/>
<
telerik:GridViewDataColumn
Header
=
"CriticalDate"
DataMemberBinding
=
"{Binding CriticalDate}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
</
UserControl
>
Code behing C#
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Net;
using
System.Windows;
using
System.Windows.Controls;
using
System.Windows.Documents;
using
System.Windows.Input;
using
System.Windows.Media;
using
System.Windows.Media.Animation;
using
System.Windows.Shapes;
namespace
LightSwitchApplication
{
public
partial
class
PortfolioRadGridControl : UserControl
{
public
PortfolioRadGridControl()
{
InitializeComponent();
}
}
}
0
John
Top achievements
Rank 1
answered on 01 May 2012, 10:14 AM
Hi Pavel
I am still experiencing this. Any idea what else might be causing this?
I have exhaustively attempted to identify it myself without any success.
Thanks
John
I am still experiencing this. Any idea what else might be causing this?
I have exhaustively attempted to identify it myself without any success.
Thanks
John
0
John
Top achievements
Rank 1
answered on 01 May 2012, 12:35 PM
OK, I have solved this.
The following gridView property needs to be set:
The following gridView property needs to be set:
SelectedItem="{Binding Value.SelectedItem, Mode=TwoWay}