| | | StrataFrame User
       
Group: Forum Members Last Login: 05/25/2007 3:34:57 PM Posts: 235, Visits: 309 |
| I've got the previously mentioned grid and bo with 24 rows of data.
How come this get sequence is called over 100 times while populating a 24 row grid?
private class Field_OccurrenceValue_Descriptor : MicroFour.StrataFrame.Business.FieldPropertyDescriptor
{
public Field_OccurrenceValue_Descriptor() : base("OccurrenceValue") { }
private System.Type _PropertyType = typeof(System.Int32);
public override object GetValue(Object component)
{
return ((ResultDefs)component).OccurrenceValue;
}
public System.Guid ResultDefId
{
get
{
return (System.Guid)this.CurrentRow["ResultDefId"];
}
Thank you,
Dan |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| Because of the way that a grid paints. Each time the grid paints the cell, it has to access the value through the property descriptor for the column, and the column is accessed by each row within the grid. My only guess is that the grid is accessing the property several times for each row to test on formatting and spacing before actually drawing the value for the column. That's why we use the property descriptors rather than allowing .NET to create ReflectDescriptor objects for each property visible in the grid... if we didn't have the property descriptors, then .NET would be reflecting 100 times for each column, each time the grid paints.
www.bungie.net |
| | | | StrataFrame User
       
Group: Forum Members Last Login: 05/25/2007 3:34:57 PM Posts: 235, Visits: 309 |
| | oh. I guess it's a good idea not to try to step this process in the debugger without a robotic finger to hit the F11 key 1200 times. |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 12/02/2008 4:42:46 PM Posts: 2,686, Visits: 1,890 |
| | |
|
|