Page 1 of 1

DataTable Editor not usable in inherited class

Posted: Wed 20 Jul 2016 04:28
by chris901
Hello,

i want to use a customized component based on your PgSqlDataTable.

So what i did was inherited it like this:

Code: Select all

    [ToolboxItem(true)]
    public class SqlDataTable : Devart.Data.PostgreSql.PgSqlDataTable
    {
        public SqlDataTable()
        {
        }
    }
It all works fine, except for one thing.

In the designer the PgSqlDataTable Editor looks like this:

Image

On the original control it looks like this:

Image

So the inherited component is somehow disabled and doesn't allow any input.

Is there a way to fix this?

Best regards,
Chris

Re: DataTable Editor not usable in inherited class

Posted: Wed 20 Jul 2016 15:10
by Pinturiccio
Try inheriting PgSqlDataTable two times, like this:

Code: Select all

[ToolboxItem(true)]
public class FirstSqlDataTable : Devart.Data.PostgreSql.PgSqlDataTable
{
    public FirstSqlDataTable()
    {
    }
}

[ToolboxItem(true)]
public class SqlDataTable : FirstSqlDataTable
{
    public SqlDataTable()
    {
    }
}
In this case SqlDataTable will have a working PgSqlDataTable Editor.

Re: DataTable Editor not usable in inherited class

Posted: Wed 20 Jul 2016 16:01
by chris901
Thank you :)

Re: DataTable Editor not usable in inherited class

Posted: Wed 20 Jul 2016 18:35
by chris901
So the DataTable is working fine.

However now i want to create an inherited component of PgSqlDataSet.

The double inheritance didn't work this time.

Image

The Buttons of the DataSet Editor are disabled.

Could you please tell me how i can get this working?

Best regards,
Chris

Re: DataTable Editor not usable in inherited class

Posted: Tue 26 Jul 2016 13:30
by Pinturiccio
For inheriting the PgSqlDataSet class you do not need double inheritance. Try inheriting the PgSqlDataSet class without the [ToolboxItem(true)] attribute.

Re: DataTable Editor not usable in inherited class

Posted: Tue 26 Jul 2016 15:35
by chris901
Hello,

i tried the create a descendant class without ToolboxItem(true) like this:

Code: Select all

    
public class NewSqlDataSet : Devart.Data.PostgreSql.PgSqlDataSet
    {
        public NewSqlDataSet()
        {
            // custom code
        }
    }
However the buttons are still disabled.
I tried several other inheritance kinds but those buttons are always disabled.

I would appreciate if you could let me know how i can inherit PgSqlDataSet and get a working Editor / Designer.

Re: DataTable Editor not usable in inherited class

Posted: Fri 29 Jul 2016 14:59
by Pinturiccio
We have added some changes to the PgSqlDataSet class and its editor should work after inheriting. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.

Re: DataTable Editor not usable in inherited class

Posted: Sat 30 Jul 2016 08:32
by chris901
Thank you, much appreciated.

Re: DataTable Editor not usable in inherited class

Posted: Wed 17 Aug 2016 21:29
by chris901
Any news on when the update will be released?

Re: DataTable Editor not usable in inherited class

Posted: Thu 18 Aug 2016 12:56
by Pinturiccio
Sorry for the late notification. The changes should be available in the latest version 7.6.714 of dotConnect for PostgreSQL. It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).

Please post here about the results.

Re: DataTable Editor not usable in inherited class

Posted: Thu 15 Sep 2016 12:32
by chris901
Sorry, I also forgot the reply.

Yes it is working fine.

I am wondering if you could implement the ability to directly inherit from PgSqlDataTable so we don't have to use a "dummy" class so it gets inherited 2 times to use the editor in the descendant? Thanks.

Re: DataTable Editor not usable in inherited class

Posted: Tue 20 Sep 2016 15:31
by Pinturiccio
We will investigate the possibility to implement a valid DataTable editor in the first descendant of PgSqlDataTable and post here about the results as soon as possible.

Re: DataTable Editor not usable in inherited class

Posted: Wed 21 Sep 2016 10:56
by Pinturiccio
We have fixed the bug with disabled DataTable editor in a first descendant of the PgSqlDataTable class. We will post here when the corresponding build of dotConnect for PostgreSQL is available for download.

Re: DataTable Editor not usable in inherited class

Posted: Wed 21 Sep 2016 11:42
by chris901
Sounds good, looking forward to it :)

Re: DataTable Editor not usable in inherited class

Posted: Thu 22 Sep 2016 14:13
by Pinturiccio
New build of dotConnect for PostgreSQL 7.6.743 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgr ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to viewtopic.php?t=34317