We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

ModifyStyle

Thread ID:

Created:

Updated:

Platform:

Replies:

22259 Dec 8,2004 04:28 AM Dec 8,2004 08:57 AM Windows Forms 4
loading
Tags: GridControl
stefan_t
Asked On December 8, 2004 04:28 AM

Hello, I use Virtual Grid Control and I set the GridStyleInfo through QueryCellInfo with e.style=ModifyStyle(...) I have tried to set ColStyles through initialization but it is impossible in Virtual mode. ( ColStyles[].BaseStyle=" " or ColStyles[].ModifyStyle ). 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 optimization . I would be very happy if the GridQueryCellInfoEventArgs.Style was not read only , to assign my style. Regards Stefan case .

Administrator [Syncfusion]
Replied On 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).

Stefan Tsalapatis
Replied On December 8, 2004 08:08 AM

Thanks, Clay 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 GridStyleInfoStore store; store = Data[rowIndex, colIndex]; Is there anything there that I can save memory since I work virtually. Thanks again

Administrator [Syncfusion]
Replied On 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. \Syncfusion\Essential Suite\3.0.0.19\Windows\Grid.Windows\Samples\Performance\OneTimeOnlyQueryCellInfo

Stefan Tsalapatis
Replied On December 8, 2004 08:57 AM

No only IGridDataProvider.QueryRowCount >\Syncfusion\Essential Suite\3.0.0.19 I wait the release to download :-) Regards Stefan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;