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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

BlinkState always None

Thread ID:

Created:

Updated:

Platform:

Replies:

104528 Jul 26,2012 09:41 PM UTC Jul 31,2012 11:40 AM UTC WinForms 4
loading
Tags: GridControl
Kymberley Dahl
Asked On July 26, 2012 09:41 PM UTC

Hi,

I have a GGC where the datasource is a BindingList, and I only add records to the datasource directly (e.g. user cannot choose to add rows, no contents of existing rows are being changed, and rows are never deleted). I want to blink the new records, however:

- BlinkState always remains None, even after calling grid.Update() after adding to the BindingList
- SourceListRecordChanged never fires

How can I get this working?

Kymberley Dahl
Replied On July 27, 2012 04:32 PM UTC

Ok I got BlinkState to change and SourceListRecordChanged to fire now - apparently my BindingList was not being updated directly like I thought. Now that it is, those things work. However I'm still having 2 problems:

- It only updates from the blink style back to the normal style on a redraw, so setting a blink time of say 3 seconds is useless if it doesn't draw again for 2 minutes (I don't always have data updating causing constant redraws). I tried all 3 modes of BlinkUpdateMode but the 2 timer options just crashed and Idle only updates on a redraw.

- Neither the BackColor nor the Interior are coloring the background of my Image cell. The cell is much larger than the image so there is plenty of room for the background color but it doesn't apply at all. Note that I do not have a background image in place.

Kalaiarasan B [Syncfusion]
Replied On July 30, 2012 05:41 AM UTC

Hi Kymberley,

 

Thank you for contacting Syncfusion forums.

 

For Query #1

 

Please refer the modified sample which features the blinking for a new record without the reported problem

 

http://www.syncfusion.com/Support/user/uploads/modifiedSourceListBlinkNewRecord_2beffcf8.zip

 

For Query #2 :

 

You could set the backcolor for the imagecell by using the QueryCellStyleInfo event.

 

For ex :

 

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)

        {

            if (e.TableCellIdentity.RowIndex > 3 && e.TableCellIdentity.ColIndex == 4)

            {

                e.Style.ImageList = img;

                e.Style.ImageIndex = 0;

                e.Style.ImageSizeMode = GridImageSizeMode.AutoSize;

                e.Style.TextMargins.Left = 20;

                e.Style.BackColor = Color.Blue;

            }

        }

 

Sample : http://www.syncfusion.com/downloads/Support/DirectTrac/General/ImageSample841198290.zip

 

Please let me know if you have any concerns

 

Regards,

Kalai


Kymberley Dahl
Replied On July 30, 2012 05:15 PM UTC

Hi,

For issue #1: your sample makes sense, however it is not making use of any of the BlinkState options. It is just using standalone timers, which of course could be done, but I was asking specifically about using the BlinkState framework that GGC has - surely it is there to be used?

For issue #2: For some reason it started working on my image cell the other day, and I hadn't changed the code I was using to do it. My code is the same as the sample you posted, only in the TableControlPrepareViewStyleInfo event instead (performance is severely degraded when in QueryCellStyleInfo).

Kalaiarasan B [Syncfusion]
Replied On July 31, 2012 11:40 AM UTC

Hi Kymberly,

For issue #1: Could you please modify the sample similar to your application to debug the issue at our end?

For Issue #2 : you could handle applying the backcolor alone in the QueryCellStyleInfo instead of all codes applying image to the cell. Leave the codes to apply image to the cell in PrepareViewStyleInfo event.
This change would not cause any performance issue. Applying style related changes (like backcolor) in QueryCellStyleInfo is preferred than PrepareViewStyleInfo since the QueryCellStyleInfo event will fire whenever the cell is subjected to draw.

Please let me know if you have any concerns

Regards,
Kalai

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

;