Can anyone tell me how to loop through the column mappings at runtime? I want to compare the property / column values of two objects by looping through and comparing only the properties that are mapped.
1 Answer, 1 is accepted
0
Ivan Ivanov
Telerik team
answered on 11 May 2011, 04:53 PM
Hello Jeff Waddell,
You may try this approach and inform us if it meets your requirements:
var value1 = (clubsGrid.ItemContainerGenerator.ContainerFromItem(item1) asGridViewRow).ChildrenOfType<GridViewCell>().Where(c => c.Column == clubsGrid.Columns[columnIndex]).First().Value;
var value2 = (clubsGrid.ItemContainerGenerator.ContainerFromItem(item2) asGridViewRow).ChildrenOfType<GridViewCell>().Where(c => c.Column == clubsGrid.Columns[columnIndex]).First().Value;
if(value1 == value2)
returntrue;
returnfalse;
}
Greetings,
Ivan Ivanov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items