| <telerik:RadSplitContainer InitialPosition="FloatingOnly" x:Name="ZoomContainer" |
| telerik:RadDocking.FloatingSize="200 200" > |
| <telerik:RadPaneGroup > |
| <telerik:RadPane CanDockInDocumentHost="False" CanUserClose="True" x:Name="paneZoom" |
| DataContext="{Binding DataContext, ElementName=root}" |
| IsHidden="{Binding DisplayZoom, Mode=TwoWay, Converter={StaticResource convInverseBoolean}}" |
| Header="Zoom" > |
| <!--<Expander IsExpanded="True" Header="Zoom">--> |
| <Grid x:Name="rootZoom"> |
| private void QDiagram_Loaded(object sender, RoutedEventArgs e) |
| { |
| //ZoomContainer.SetValue(RadDocking.FloatingLocationProperty, new Point(132, 10)); |
| RadDocking.SetFloatingLocation(ZoomContainer, new Point(132, 10)); |
| } |
<Telerik:RadNumericUpDown IsInteger="True" Minimum="0" x:Name="NumericPieces" Value="1" Grid.Column="1" Margin="5" Grid.Row="0"></Telerik:RadNumericUpDown>We have a RadGridView with 2 columns.
When we edit a cell or when we are adding a new row, we want to loop through the rows cell[1] to check for duplicates.
We want to do this in...
private void TheGridCellValidating(object sender, GridViewCellValidatingEventArgs e).
We try things like this...
var grid = (e.Row).GridViewDataControl;
string value = e.NewValue.ToString();
var rows = grid.ChildrenOfType<GridViewRow>();
foreach (var row in rows)
{
if (row == null) continue;
if (row.Cells == null) continue;
if (row.Cells[1] != null)
{
var s = row.Cells[0]......
...
....
}
}
But... it won't work.
How can we iterate on the rows and check for duplicates?