P
Peted
Im using c# vs2008 sp1
im making use of a property grid control on a form, and im setting its
selectedobject property to a class object
Eg
MyCLass test = new MyClass();
pgGrid.SelectedObject = test;
The requiste properties and information in the property grid come up
ok and i can tweak the display slightly introducing the limited
ComponentModel attributes into the class
Eg
[CategoryAttribute("Question Properties"),
DescriptionAttribute("The Question Number."), ]
My problem is there seems to be no way to progrmaticly adjust things
like
1. adjusting the width of the columns in the grid
2. adjust the width of a column in the grid to make sure to fit the
longest peice of text width.
3. Show more row grids than availble properties, even if those row
grids are empty of data.
4. Adjust font size and colours of the text in the grid so i can have
different colours for different text in different grid rows
5. use a dropdown combox for a property
6. Using properties name text other than the properties named in the
class.
Eg i have a property in the class like this
[CategoryAttribute("Question Properties"), DescriptionAttribute("The
Question Number."), ]
public int Number
{
get { return this._number; }
set { this._number = value; }
}
but i want the propertygrid to show its name as
"Number of Questions"
My internet searchs have not yeilded any food results if anyone can
help with advice or info appreciated in advance.
regards
Peted
im making use of a property grid control on a form, and im setting its
selectedobject property to a class object
Eg
MyCLass test = new MyClass();
pgGrid.SelectedObject = test;
The requiste properties and information in the property grid come up
ok and i can tweak the display slightly introducing the limited
ComponentModel attributes into the class
Eg
[CategoryAttribute("Question Properties"),
DescriptionAttribute("The Question Number."), ]
My problem is there seems to be no way to progrmaticly adjust things
like
1. adjusting the width of the columns in the grid
2. adjust the width of a column in the grid to make sure to fit the
longest peice of text width.
3. Show more row grids than availble properties, even if those row
grids are empty of data.
4. Adjust font size and colours of the text in the grid so i can have
different colours for different text in different grid rows
5. use a dropdown combox for a property
6. Using properties name text other than the properties named in the
class.
Eg i have a property in the class like this
[CategoryAttribute("Question Properties"), DescriptionAttribute("The
Question Number."), ]
public int Number
{
get { return this._number; }
set { this._number = value; }
}
but i want the propertygrid to show its name as
"Number of Questions"
My internet searchs have not yeilded any food results if anyone can
help with advice or info appreciated in advance.
regards
Peted