I have a vertical scroll bar on my XamGrid.
According to XamGrid's height it can show only six records.
It has one Template Column with RationButton.
The problem is when the data is more than six records lets say 10
at the time of loading if the radio button got selected on the first row as per the database valueand If I scoll down and select the radio button at the bottom and scroll up gain the radio button on the first row gets uncheched that is expected behaviour of Radion button. no issues at this point.
Then If I select the radion button on the first row and scroll down to the last row the ratio button on the last row is also shows as checked.
Other thing is if I scroll up again back to the first row the first row is unchecked, I am not sure why it is unchecked
If I repeat this any number of times the first row is never getting selected.
Can some one help me on this?
I am using VS2010, Silverlight 4 and Infragistics's Netadvantage for Silverlithg Line of business V10.3
Here is the Xaml and code behind to bind the gird.
Xaml----<ig:XamGrid x:Name="xamGridEvents" ScrollViewer.VerticalScrollBarVisibility="Auto" AutoGenerateColumns="False" RowHeight="23" CellClicked="xamGridEvents_CellClicked">
<ig:XamGrid.SortingSettings> <ig:SortingSettings AllowSorting="False" ></ig:SortingSettings> </ig:XamGrid.SortingSettings>
<ig:XamGrid.Columns> <ig:TextColumn HeaderText="Event" Key="EventType" IsReadOnly="True" HeaderTextHorizontalAlignment="Center" HorizontalContentAlignment="Center" Width="80" /> <ig:TemplateColumn HeaderText="Yes/No" Key="YesNoFlag" HorizontalContentAlignment="Center" Width="*" > <ig:TemplateColumn.ItemTemplate > <DataTemplate > <RadioButton HorizontalAlignment="Left" VerticalAlignment="Center" IsChecked="{Binding Path=YesNoFlag, Mode=TwoWay}" GroupName="GroupradioButtonInEvent" Name="radioButtonInEvent" /> </DataTemplate> </ig:TemplateColumn.ItemTemplate> </ig:TemplateColumn> </ig:XamGrid.Columns> </ig:XamGrid>
Code behindxamGridEvents.ItemsSource = e.Result.EventList;
Hi,
So basically a RadioButton's default functionality won't work in the xamGrid, b/c of virtualization. When a cell is out of view, there is no UI link to it anymore. Which means when you change another radio button, the currently checked cell will never get notified of a change if its not in view.
So, you need to implement this logic in your ViewModel, where you keep track of the last checked data object, and listen to see if the checked property of another data object gets checked. If that happens then you update the lastChecked data object to false.
Hope this helps,
-SteveZ
Sayap
Where you able to resolve this. I have the same issue.
I dont use MVVM but SL4 and infragistics xamgrid 2011.1
I have a grid with 3 bound columnd and another 3 UnBound columns.
and i am typing in 1st row some value say 6 and i scroll down using mouse , the last row has the value 6, also same when i change last row. 1st row gets changed.
But the same does not happen when i use the keyboard down arrow.only with mouse scroll up and down.
Infragistics Team can you help
I dont use MVVM, SL4 m 2011.1 version and xaml. codebehind.
Steve's explanation above , i could not understand.
Hello,
Thank you for your post. I have been looking into it, but it seems like I am missing something about your scenario, so if this is still an issue for you, could you please send me an isolated sample project, where this is reproduced, and the steps i need to follow, so I can investigate it further for you.
Looking forward for your reply.