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 : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridControl cell only changes after I change focus

Thread ID:

Created:

Updated:

Platform:

Replies:

120767 Oct 13,2015 05:41 PM UTC Oct 14,2015 12:31 PM UTC WinForms 2
loading
Tags: GridControl
Rodrigo Vedovato
Asked On October 13, 2015 05:41 PM UTC

Hi!

I'm currently developing a Windows Forms application using Syncfusion's GridControl. The grid is updated every 250ms . But if one of the updated cells is selected, that cell value is not updated until I change the focus to another cell. Here's the code I'm using to notify which cells need to be updated.

Size _oldSize;
Graphics _graphics;

private void UpdateGridCell(int row, int col)
{
if (_oldSize != _gridControl.ClientSize)
{
if (_graphics != null)
_graphics.Dispose();

_graphics = null;

_oldSize = _gridControl.ClientSize;
}

if (_graphics == null)
_graphics = _gridControl.CreateGridGraphics();

GridRangeInfo range = GridRangeInfo.Cell(row, col);

if (range == _gridControl.CurrentCell.RangeInfo)
{
_gridControl.CurrentCell.Model.ResetActiveText(row, col);
}
else
{
Rectangle bounds = _gridControl.RangeInfoToRectangle(headerRange);

if (!bounds.IsEmpty)
{
_gridControl.DrawClippedGrid(_graphics, bounds);
}
}
}

PS: I extracted this code from Syncfusion performance samples.

Rodrigo Vedovato
Replied On October 13, 2015 08:43 PM UTC

I used DrawClippedGrid in all cases and it worked.

Solai A L [Syncfusion]
Replied On October 14, 2015 12:31 PM UTC

Hi Rodrigo,

Thank you for your interest in Syncfusion products.

We are glad to know that your issue has been resolved. Please let us know if have any concerns in future.

Regards,

AL.Solai.



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

;