StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Program Flow QuestionExpand / Collapse
Author
Message
Posted 08/23/2006 7:59:18 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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
Post #2426
Posted 08/24/2006 8:52:52 AM


StrataFrame Developer

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
Post #2431
Posted 08/24/2006 1:53:54 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame 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.
Post #2440
Posted 08/24/2006 2:08:25 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: 12/02/2008 4:42:46 PM
Posts: 2,686, Visits: 1,890
Hehe, no, that wouldn't be much fun


www.bungie.net
Post #2445
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 3:02am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.125. 11 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.