Recent

Author Topic: TDBGrid.SavetoFile - How does one set Options?  (Read 6375 times)

Wes

  • Newbie
  • Posts: 2
TDBGrid.SavetoFile - How does one set Options?
« on: November 06, 2009, 06:43:03 pm »
Hi,

I would like to save order of the columns in a dbgrid.  I thought I would be able to do this with dbgrid.savetofile('griddata.xml').

However, the saved file contains only:

<?xml version="1.0"?>
<CONFIG>
  <grid version="3">
    <saveoptions create="False" position="False"/>
  </grid>
</CONFIG>


TStringGrid has  .SaveOptions,  But if TdbGrid does, I can't find it.

Could someone tell me what I doning wrong?

The reason I want to do this, so that if columns are moved or resized, they can be saved and restored the next time the program is run.

Thanks in advance.  Wes

bluewolf

  • New Member
  • *
  • Posts: 24
Re: TDBGrid.SavetoFile - How does one set Options?
« Reply #1 on: November 07, 2009, 06:49:39 pm »
Apparently this seems to be a bug in TDBGrid.

Differently from TStringGrid and generic class TCustomGrid it seems that the property SaveOptions is an empty set.

However I'm quite new to Lazarus and I might be wrong.

Maybe someone else can give an additional advice.
« Last Edit: November 07, 2009, 10:39:45 pm by bluewolf »
Alberto

bluewolf

  • New Member
  • *
  • Posts: 24
Re: TDBGrid.SavetoFile - How does one set Options?
« Reply #2 on: November 08, 2009, 07:14:33 pm »
Hi Wes,

I have reported the bug # 0015033 on bugtracker about this problem.

Alberto.
Alberto

Wes

  • Newbie
  • Posts: 2
Re: TDBGrid.SavetoFile - How does one set Options?
« Reply #3 on: November 09, 2009, 01:44:24 pm »
Alberto,

Thank you for reporting the bug.  I wasn't familiar with the reporting procedures. 

Also, I wanted to make sure I hadn't overlooked something simple.  It's happened before.  :)

Thanks again,
Wes

bluewolf

  • New Member
  • *
  • Posts: 24
Re: TDBGrid.SavetoFile - How does one set Options?
« Reply #4 on: November 09, 2009, 06:41:45 pm »
Wes,

to be honest it is my first bug report.  :D

Alberto

 

TinyPortal © 2005-2018