I use Virtual Grid Control and
I set the GridStyleInfo through
I have tried to set ColStyles through
initialization but it is impossible in
( ColStyles.BaseStyle=" " or
My Question is :
What is the cost ( time & memory )of ModifyStyle in QueryCellInfo ?
( I use StyleModifyType.Changes and in one case StyleModifyType.Override).
Except time does it waste memory ?
I'' m satisfied but I wonder about any
I would be very happy if the
was not read only , to assign my style.
ADAdministrator Syncfusion Team December 8, 2004 06:21 AM
You can set column style properties from within QueryCellInfo. Look for e.ColIndex > 0 and e.RowIndex == -1. In this case, QueryCellInfo is working with the column style in e.Style for the column e.ColIndex.
In general, style memory usage is optimized in QueryCellInfo. (That is why e.Style is readonly. It lets the grid have complete control over when this object is allocated and disposed.)
If you look at the grid source, you will see that it uses ModifyStyle to combine styles in its QueryCellInfo code (Model.GetCellInfo).
STStefan TsalapatisDecember 8, 2004 08:08 AM
I have seen the GetCellInfo
I use IGridDataProvider and always
I return with event.handled=true;
I do not want anything to store in grid memory ( I know it doesn''t save data but styles for every cell ?).
I wonder about the
store = Data[rowIndex, colIndex];
Is there anything there that I can save
memory since I work virtually.
ADAdministrator Syncfusion Team December 8, 2004 08:22 AM
If you have a true virtual grid (never explicitly setting grid.RowCount = xxxx or grid.ColCount = yyyy, instead always providing these values through QueryRowCount and QueryColCount), then Data[rowIndex, colIndex] will always return null.
The style information used in QueryCellInfo lives as weak references in a volatile data cache. This means normally their life cycle is short and they will be garbage collected at first opportunity. They are cached in thie volatile data store to relieve the load on QueryCellInfo.
There is a way for you to have more control over this volatile datastore and when QueryCellInfo is hit. In 3.0, we ship a sample that shows how you can get QueryCellInfo to be hit only once.
STStefan TsalapatisDecember 8, 2004 08:57 AM
No only IGridDataProvider.QueryRowCount
I wait the release to download :-)