Good day,
I am trying to enable blinking on a GridGroupingControl.
I am using your GroupingTraderGridTest_2015 as reference which does have blinking which works on my pc.
However when i try to only enable Blinking on my own grid I cannot get it to work.
The below code I got from your example.
In your example you do have a gridGroupingControl1_TableControlPrepareViewStyleInfo event where you check the blink state. I added it just to confirm that blinkstate is always ==None
[Code]
#region -Blinking
// Highlight up and downticks
this.gridGroupingControl1.BlinkTime = 700; // in ms //Set blink timer
//this.gridGroupingControl1.TableDescriptor.Columns[nameof(tblInstrument.ClosingPrice)].AllowBlink = true; //The actual column supposed to be blinking
foreach (GridColumnDescriptor item in this.gridGroupingControl1.TableDescriptor.Columns) //Mark all columns as blink to test
{
item.AllowBlink = true;
}
this.gridGroupingControl1.Engine.AddBaseStylesForBlinking(); //Uptick style
this.gridGroupingControl1.BaseStyles[GridEngine.BlinkIncreased].StyleInfo.TextColor = Color.White;
this.gridGroupingControl1.BaseStyles[GridEngine.BlinkIncreased].StyleInfo.BackColor = Colors.Green;
this.gridGroupingControl1.BaseStyles[GridEngine.BlinkReduced].StyleInfo.TextColor = Color.White;
this.gridGroupingControl1.BaseStyles[GridEngine.BlinkReduced].StyleInfo.BackColor = Colors.Red;
//This event is just to confirm that blinkstate is = None
this.gridGroupingControl1.TableControlPrepareViewStyleInfo += new GridTableControlPrepareViewStyleInfoEventHandler(gridGroupingControl1_TableControlPrepareViewStyleInfo);
#endregion
void gridGroupingControl1_TableControlPrepareViewStyleInfo(object sender, GridTableControlPrepareViewStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = (GridTableCellStyleInfo)e.Inner.Style;
BlinkState bs = gridGroupingControl1.GetBlinkState(style.TableCellIdentity);
if (bs != BlinkState.None)
{
string s = "Debug point here becasue blink works now";
}
}
[/Code]
I looked at your Online Documentation and only found one section under GridGroupingControl-> Performance -> BlinkingTime and no other requirements are listed.
So what is the other requirements for Blinking to be enabled?
- I tested Column types of int and double.
- The grid is the default grid with only the Blink code and the dataSource code being changed.
Regards,
James
Attachment:
DataTableToGridGroupingControl_e7fe5b72.zip