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. Image for the cookie policy date

GGC 7.403.0.20 - Remove flciker of red exceptions

Hi:

I want to validate GGC grid data. I am trying to validate data in GGC QueryCellStyleInfo method. When I modify record data and reintialize grid, I get quick flicker of red exception and then it goes away. How can I avoid flicker of red exception?

Thank you,
Bina


void gridGroupingControl_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
GridTableCellStyleInfo style = e.Style;

if (style.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record &&
e.TableCellIdentity.ColIndex == IP_ADDRESS_COL_INDEX)
{
Record record = style.TableCellIdentity.DisplayElement.ParentRecord;
if (_radioIpManual.Checked) // checkbox
{
string ipAddress = record.GetValue(IP_ADDRESS_STR).ToString();

// remove additional white spaces
if (ipAddress.Length != ipAddress.Trim().Length)
{
NetworkDevice device = record.GetData() as NetworkDevice;
ipAddress = ipAddress.Trim();
device.IpAddress = ipAddress;
gridGroupingControl.Reinitialize();
}
}

}


1 Reply

NR Nirmal Raja Syncfusion Team May 23, 2010 02:12 PM UTC

Hi Bina,

Sorry for the delay.

The QueryCellStyleInfo will always be fired when ever the grid gets some changes over the control. It fires even it got

a mouse move action or anything drawn over the cells. So if you call the Reinitialize, thn for each action the grid will be

flickering over the control as it reinitialize the whole control for each cell drawn. Instead of Reinitialize, please try to

use the Invalidate event which updates internally for the cell styles.

Please refer the code below:
gridGroupingControl.Reinitialize();

Let me know if you have any queries.

Regards,
Nirmal

Loader.
Live Chat Icon For mobile
Up arrow icon