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

Grid is in updating mode

Thread ID:

Created:

Updated:

Platform:

Replies:

142616 Feb 12,2019 01:34 PM UTC Feb 19,2019 06:29 AM UTC WinForms 7
loading
Tags: GridControl
Kedar Ghadge
Asked On February 12, 2019 01:34 PM UTC

I am getting this exception :

at Syncfusion.Windows.Forms.Grid.GridControlBase.OnPaint  :  Grid is in updating mode
   at ClientServerCommonUtilities.FICDebug.WriteException(Exception& aoException, ModuleName aeModule)
   at ClientControls.MaximeyesDataBoundGrid.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at Syncfusion.Windows.Forms.ScrollControl.WmPaint(Message& msg)
   at Syncfusion.Windows.Forms.ScrollControl.WndProc(Message& msg)
   at Syncfusion.Windows.Forms.Grid.GridControlBase.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.PeekMessage(MSG& msg, HandleRef hwnd, Int32 msgMin, Int32 msgMax, Int32 remove)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at MaximEyes.Main.Main()


My UI on windows form is getting distorted because of it. names in Grid are not showing properly. will you please help me on this?

Arulraj A [Syncfusion]
Replied On February 13, 2019 06:38 AM UTC

Hi Kedar, 

Thanks for using Syncfusion product. 

The reported issue occur when trying to render the grid in update mode. So, we suspect you may use the BeginUpdate method and try to paint the grid without using the EndUpdate method. Also, your shared code part, you have implement the MaximeyesDataBoundGrid and override the OnPaint method. So, you may handle this exception by using Updating property. Please find the following code example. 

C# 
public class MaximeyesDataBoundGrid : GridControl 
{ 
    public MaximeyesDataBoundGrid() 
    { } 
 
    protected override void OnPaint(PaintEventArgs pe) 
    { 
        if (this.Updating) 
            return; 
        base.OnPaint(pe); 
    } 
} 
 
If you still face the problem please provide the code you are using or an issue reproducible sample to reproduce your reported scenario. It will be helpful us to address the issue at the earliest. 

Regards,  
Arulraj A  


Kedar Ghadge
Replied On February 14, 2019 10:34 AM UTC

Hi Kedar, 

Thanks for using Syncfusion product. 

The reported issue occur when trying to render the grid in update mode. So, we suspect you may use the BeginUpdate method and try to paint the grid without using the EndUpdate method. Also, your shared code part, you have implement the MaximeyesDataBoundGrid and override the OnPaint method. So, you may handle this exception by using Updating property. Please find the following code example. 

C# 
public class MaximeyesDataBoundGrid : GridControl 
{ 
    public MaximeyesDataBoundGrid() 
    { } 
 
    protected override void OnPaint(PaintEventArgs pe) 
    { 
        if (this.Updating) 
            return; 
        base.OnPaint(pe); 
    } 
} 
 
If you still face the problem please provide the code you are using or an issue reproducible sample to reproduce your reported scenario. It will be helpful us to address the issue at the earliest. 

Regards,  
Arulraj A  


Hi Arulraj,

Yes you are right we have overridden the method of OnPaint method and suggestion you provide I will implement it. For more understanding, I am providing you a sample of code and in the sample of code, I mentioned in the comment where the exception is occurring.

Public Class MDBoundGrid
     Inherits Syncfusion.Windows.Forms.Grid.GridDataBoundGrid
     
     Protected Overrides Sub OnPaint(ByVal pe As System.Windows.Forms.PaintEventArgs) 
          Try
               'Some code
          Catch ex As Exception
               'make entry in logs
          End Try
               MyBase.onpaint(Pe)
End Sub
'''Some Other methos
Imports ClientControls.MDBoundGrid
Public Class Appointments

     Friend WithEvents MDBoundGrid_Appointments As ClientControls.MDBoundGrid

     Private Sub RefreshAppointmentsGrid(ByVal asType As String)
           Try
                  'for the following code exception is occurring, most of the time when DataSource is getting filled.
                  MDBoundGrid_Appointments.DataSource = moAppointmentDV 'moAppointmentDV is already filled System.Data.DataView 
                  MDBoundGrid_Appointments.Refresh()
           Catch e As Exception
                  'make the entry in logs
           End Try
    End Sub

As well as I would like to let you know the exception I have mentioned before was seen in recent days when I have added some Logs in code, before that we had got following exception logs, and output was same UI distortion.

: In Filling appointment Grid with datasetSystem.ArgumentException: Value does not fall within the expected range.

   at Syncfusion.Windows.Forms.Grid.GridRangeInfo..ctor(Int32 top, Int32 left, Int32 bottom, Int32 right)

   at Syncfusion.Windows.Forms.Grid.GridRangeInfo.InternalCells(Int32 top, Int32 left, Int32 bottom, Int32 right)

   at Syncfusion.Windows.Forms.Grid.GridViewLayout.Initialize()

   at Syncfusion.Windows.Forms.Grid.GridViewLayout.DemandInitialize()

   at Syncfusion.Windows.Forms.Grid.GridViewLayout.ColIndexToVisibleClient(Int32 col, Boolean& hidden)

   at Syncfusion.Windows.Forms.Grid.GridViewLayout.VisitVisibleCells(GridRangeInfo range, GridRowColRangeInfoHandler[] handler)

   at Syncfusion.Windows.Forms.Grid.GridControlBase.RangeInfoToRectangle(GridRangeInfo range, GridRangeOptions options)

   at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.PerformLayout(Int32 rowIndex, Int32 colIndex)

   at Syncfusion.Windows.Forms.Grid.GridCellRendererBase.Initialize(Int32 rowIndex, Int32 colIndex)

   at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Refresh()

   at Syncfusion.Windows.Forms.Grid.GridControlBase.Refresh(Boolean fromModel)

   at Syncfusion.Windows.Forms.Grid.GridControlBase.Refresh()

   at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.BinderDataSourceChanged(Object sender, EventArgs e)

   at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.OnDataSourceChanged(EventArgs e)

   at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.Set_ListManager(Object newDataSource, String newDataMember, Boolean force, Boolean forceColumnCreation)

   at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.set_DataSource(Object value)

   at Syncfusion.Windows.Forms.Grid.GridDataBoundGrid.set_DataSource(Object value)

   at ClientUIMainForm.Appointments.RefreshAppointmentsGrid(String asType)

I wonder if you could throw some light in to it as well.

Arulraj A [Syncfusion]
Replied On February 15, 2019 06:34 AM UTC

Hi Kedar, 

Thanks for your update. 

From your code part, you are trying to bind the datasource for GridDataBoundGrid. This code part is not helpful to reproduce your reported scenario. We have tested your reported scenario with below attached sample using our Syncfusion product version 16.4.0.42 and 16.4.0.52. But the sample is working fine as we expected. So, if it is possible please provide the simple application with issue reproduceable state which will be helpful for us to provide the solution at the earliest. 

 
Please let us know if you need any further details on this. 

Arulraj A 


Kedar Ghadge
Replied On February 15, 2019 07:36 AM UTC

Hi Kedar, 

Thanks for your update. 

From your code part, you are trying to bind the datasource for GridDataBoundGrid. This code part is not helpful to reproduce your reported scenario. We have tested your reported scenario with below attached sample using our Syncfusion product version 16.4.0.42 and 16.4.0.52. But the sample is working fine as we expected. So, if it is possible please provide the simple application with issue reproduceable state which will be helpful for us to provide the solution at the earliest. 

 
Please let us know if you need any further details on this. 

Arulraj A 


Hi Arulraj,

Actually, the application is working fine on our almost all of the PC this issue is occurring only on a couple of PC and those are also random. It is hard for us as well to reproduce the issue, till now we are able to track this issue by that much logs only.

So it will be a time-consuming process to us, to create a small application and after that as well we will be not sure if this issue will get reproduce on it or not.

Arulraj A [Syncfusion]
Replied On February 18, 2019 09:21 AM UTC

Hi Kedar,  

We have created a new support incident under your account, please follow the incident for further assistance. Kindly log on to our support website to check further updates on it. 

Regards, 
Arulraj A 


Kedar Ghadge
Replied On February 18, 2019 03:49 PM UTC

Hi Arulraj,

I didn't understand how to use that incident, I mean how to put issue over there or what can I do. will you please help me over this.

Arulraj A [Syncfusion]
Replied On February 19, 2019 06:29 AM UTC

Hi Kedar, 

Thanks for the update. 

Following are the steps to see and create the incidents 

  1. Click the following link
  1. User your Syncfusion account username and password to login
  2. You can see the following screen with the incidents associated with your account.
 

To create new incidents click the “NEW INCIDENT” button at the top right. 
 

Let us know whether this helps also if you need any further assistance on this. 

Arulraj A 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

;