GDI Objects reaching limit of 10000
Hi,
We are setting the text in the QueryCellStyleInfo event on our gridgroupingcontrol. When we do this and start scrolling around the grid we eventually get an out of memory exception. What we can see going on is when we set the text using property GridTableCellStyleInfo.Text and scroll around on the grid the number of GDI objects keeps increasing until the 10000 limit is hit and an out of memory exception is thrown. The GDI objects never seem to be released. Is there a way to keep this from happening?
Thanks!
We are setting the text in the QueryCellStyleInfo event on our gridgroupingcontrol. When we do this and start scrolling around the grid we eventually get an out of memory exception. What we can see going on is when we set the text using property GridTableCellStyleInfo.Text and scroll around on the grid the number of GDI objects keeps increasing until the 10000 limit is hit and an out of memory exception is thrown. The GDI objects never seem to be released. Is there a way to keep this from happening?
Thanks!
SIGN IN To post a reply.
5 Replies
RB
Ragamathulla B
Syncfusion Team
December 10, 2011 05:19 AM UTC
Hi Sean,
Thank you for your interest in syncfusion products,
1) I Would request you to please provide your version details.
2) And also am afraid to reproduce your reported issue so please provide more details and sample regarding your issue. Thanks for aditional information.
Please let me know if you have any further concerns.
Regards,
Ragamathullah B.
Thank you for your interest in syncfusion products,
1) I Would request you to please provide your version details.
2) And also am afraid to reproduce your reported issue so please provide more details and sample regarding your issue. Thanks for aditional information.
Please let me know if you have any further concerns.
Regards,
Ragamathullah B.
SE
sean
December 19, 2011 02:00 PM UTC
The version is 8.3.0.21.
I now think it has more to do with setting the font size or color. I have modified one of the demo's to show what is happening. Once running just keep scrolling up and down and watch the gdi object grow on a Win7 machine. Once the 10000 limit is reached an out of memory error is thrown.
We are adding custom sections on the grid and setting the text and font size and color in QueryCellStyleInfo.
CS_c1d80700.rar
I now think it has more to do with setting the font size or color. I have modified one of the demo's to show what is happening. Once running just keep scrolling up and down and watch the gdi object grow on a Win7 machine. Once the 10000 limit is reached an out of memory error is thrown.
We are adding custom sections on the grid and setting the text and font size and color in QueryCellStyleInfo.
CS_c1d80700.rar
RB
Ragamathulla B
Syncfusion Team
December 20, 2011 12:48 AM UTC
Hi Sean,
Thanks for the update.
The QueryCellInfo is trigger every time so i would request you to please use PrepareViewStyleInfo instead of QueryCellInfo. The following code explains the same.
Please let me know if you have any further concerns.
Regards,
Ragamathullah B.
Thanks for the update.
The QueryCellInfo is trigger every time so i would request you to please use PrepareViewStyleInfo instead of QueryCellInfo. The following code explains the same.
gridGroupingControl1.TableControl.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(TableControl_PrepareViewStyleInfo);
void TableControl_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
{
//code
}
Please let me know if you have any further concerns.
Regards,
Ragamathullah B.
SE
sean
December 20, 2011 03:11 PM UTC
Thanks!
If we run into any more issues I will consider making that change. I managed to solve this by a recommendation in a previous post on the forums.
Ended up going with adding new base styles and using those in when setting the font properties in query cell style info method. Seems to have solved the issue.
Using this during grid intialization:
gridGroupingControl.BaseStyles.Add("BoldStyle");
gridGroupingControl.BaseStyles["BoldStyle"].StyleInfo.Font.Bold = true;
gridGroupingControl.BaseStyles["BoldStyle"].StyleInfo.Font.Size = 7;
Then in querycellstyleinfo assigning the new style:
eStyle.BaseStyle = "BoldStyle";
Thanks again!
Sean
If we run into any more issues I will consider making that change. I managed to solve this by a recommendation in a previous post on the forums.
Ended up going with adding new base styles and using those in when setting the font properties in query cell style info method. Seems to have solved the issue.
Using this during grid intialization:
gridGroupingControl.BaseStyles.Add("BoldStyle");
gridGroupingControl.BaseStyles["BoldStyle"].StyleInfo.Font.Bold = true;
gridGroupingControl.BaseStyles["BoldStyle"].StyleInfo.Font.Size = 7;
Then in querycellstyleinfo assigning the new style:
eStyle.BaseStyle = "BoldStyle";
Thanks again!
Sean
RB
Ragamathulla B
Syncfusion Team
December 22, 2011 05:56 AM UTC
Hi Sean,
Please let me know if you have any concern.
Regards,
Ragamathullah B.
Please let me know if you have any concern.
Regards,
Ragamathullah B.
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
SE sean
- Dec 8, 2011 05:48 PM UTC
- Dec 22, 2011 05:56 AM UTC