A
Andy Fish
Hi,
Say I have an Array of "Person" objects that I'm using as the DataSource for
a grid control. At databinding time I'd like to select only people with
age>18 to go into the grid and ignore all the others.
The only way I can think is to make a new array (or arraylist) containing
only those I want to display but this seems a bit cumbersome. Is there any
simple way to do this (for example in the ItemDataBound event)?
I guess I could write a custom enumerator but that sounds like even more
work than copying the array.
TIA
Andy
Say I have an Array of "Person" objects that I'm using as the DataSource for
a grid control. At databinding time I'd like to select only people with
age>18 to go into the grid and ignore all the others.
The only way I can think is to make a new array (or arraylist) containing
only those I want to display but this seems a bit cumbersome. Is there any
simple way to do this (for example in the ItemDataBound event)?
I guess I could write a custom enumerator but that sounds like even more
work than copying the array.
TIA
Andy