Dispose FlexGrid

Originally Posted 24 January 2017, 6:06 am EST

  • Originally Posted 24 January 2017, 6:06 am EST

    Hi,

    I am working with componentOne Winform and use C1.Win.C1FlexGrid.4.dll (ver: 4.0.20161.147).

    I use feature: assign FlexGrid (grid B) to DataSource property of another FlexGrid (grid A).

    I have a problem: when i manually dispose grid B (by calling grid.Dispose), error is occured:

    System.NullReferenceException: Object reference not set to an instance of an object.
    at #s5.#2fb.GetData(Int32 #j, Int32 #l)
    at #s5.#2fb.GetDataDisplay(Int32 #j, Int32 #l)
    at #s5.#2fb.GetDataDisplay(Int32 #j, Int32 #l, Image& #Ak, CheckEnum& #bdb)
    at C1.Win.C1FlexGrid.C1FlexGridBase.GetDataDisplay(Int32 row, Int32 col, Image& img, CheckEnum& chk)
    at C1.Win.C1FlexGrid.C1FlexGridBase.DrawCell(PaintEventArgs e, Int32 row, Int32 col)
    at C1.Win.C1FlexGrid.C1FlexGrid.DrawCell(PaintEventArgs e, Int32 row, Int32 col)
    at C1.Win.C1FlexGrid.C1FlexGridBase.DrawRow(PaintEventArgs e, Int32 row)
    at C1.Win.C1FlexGrid.C1FlexGrid.DrawRow(PaintEventArgs e, Int32 row)
    at C1.Win.C1FlexGrid.C1FlexGridBase.#adb(PaintEventArgs #tQ)
    at C1.Win.C1FlexGrid.C1FlexGridBase.OnPaint(PaintEventArgs e).

    Thank you for your support.

    2017/01/WindowsFormsApplication2.7z
  • Reply

    Hi,

    This is a bug in the control which has now been fixed in an internal build. Will let you know once the build will be available in public.

    Thanks,
    Pragati
  • Reply

    Hi,

    Thank you for your support.

    After updating the new build, i run sample once again, but error still occur.

    Hope that will respond soon.
    2017/02/Splits.zip
  • Reply

    Hi,

    Yes, I could observe that too. I have notified developer about this. Will share the status soon.

    ~Pragati
  • Reply

    Hi Pragati,

    I would like to ask one more question: do you have an option to hide column header (fixed rows) of the copied grid without hiding original grid's fixed (suspend sync between two grid) ?

    Hope that will respond soon.

    Regards,

    Trung Nguyen
  • Reply

    Hi Trung,

    This is directly not possible. Can you please share your use case so that I can try providing you an alternative, if possible.

    Thanks,
    Pragati
  • Reply

    Hi,

    We are pleased to inform you that the issue has been fixed in the latest release of C1_WinForms. You may download the same from the following links:
    http://prerelease.componentone.com/dotnet40/c1winforms/2017-t1/C1WinForms.4_4.0.20171.248.zip
    http://prerelease.componentone.com/dotnet20/c1winforms/2017-t1/C1WinForms.2_2.0.20171.248.zip

    Best Regards
    Ruchir Agarwal
  • Marked as Answer

    Reply

    Hi,

    This issue has been fixed in the new build which can be downloaded from here:
    http://prerelease.componentone.com/hotfixes/dotnet/C1WinForms.2_2.0.20163.238.zip
    http://prerelease.componentone.com/hotfixes/dotnet/C1WinForms.4_4.0.20163.238.zip

    Thanks,
    Pragati
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels