B
brianlanning
Suppose I have an object that looks like this:
public class thing
private mOne as string
private mTwo as string
private mThree as string
private mFour as string
public property one as string
bla
end property
(and so on, public properties for the others)
end class
then I make a List(of Thing) and add a bunch of instances
then I bind the list to a datagridview
It's not possible for me to make the properties private
My problem is that I only want to display properties One and Two in
the grid view. I want Three and Four around to help out with sorting
and data type conversion, but I don't want to display them in the
grid. Currently, I just remove the columns programmatically. But
what I really want is to decorate the properties with attributes that
affect which properties appear in the grid. Does such an attribute
exist?
brian
public class thing
private mOne as string
private mTwo as string
private mThree as string
private mFour as string
public property one as string
bla
end property
(and so on, public properties for the others)
end class
then I make a List(of Thing) and add a bunch of instances
then I bind the list to a datagridview
It's not possible for me to make the properties private
My problem is that I only want to display properties One and Two in
the grid view. I want Three and Four around to help out with sorting
and data type conversion, but I don't want to display them in the
grid. Currently, I just remove the columns programmatically. But
what I really want is to decorate the properties with attributes that
affect which properties appear in the grid. Does such an attribute
exist?
brian