DataTable Editor not usable in inherited class

DataTable Editor not usable in inherited class

Postby chris901 » Wed 20 Jul 2016 04:28

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
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Wed 20 Jul 2016 15:10

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.
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44

Re: DataTable Editor not usable in inherited class

Postby chris901 » Wed 20 Jul 2016 16:01

Thank you :)
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby chris901 » Wed 20 Jul 2016 18:35

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
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Tue 26 Jul 2016 13:30

For inheriting the PgSqlDataSet class you do not need double inheritance. Try inheriting the PgSqlDataSet class without the [ToolboxItem(true)] attribute.
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44

Re: DataTable Editor not usable in inherited class

Postby chris901 » Tue 26 Jul 2016 15:35

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.
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Fri 29 Jul 2016 14:59

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.
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44

Re: DataTable Editor not usable in inherited class

Postby chris901 » Sat 30 Jul 2016 08:32

Thank you, much appreciated.
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby chris901 » Wed 17 Aug 2016 21:29

Any news on when the update will be released?
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Thu 18 Aug 2016 12:56

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/postgresql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).

Please post here about the results.
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44

Re: DataTable Editor not usable in inherited class

Postby chris901 » Thu 15 Sep 2016 12:32

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.
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Tue 20 Sep 2016 15:31

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.
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Wed 21 Sep 2016 10:56

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.
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44

Re: DataTable Editor not usable in inherited class

Postby chris901 » Wed 21 Sep 2016 11:42

Sounds good, looking forward to it :)
chris901
 
Posts: 64
Joined: Wed 20 Jul 2016 04:21

Re: DataTable Editor not usable in inherited class

Postby Pinturiccio » Thu 22 Sep 2016 14:13

New build of dotConnect for PostgreSQL 7.6.743 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/postgresql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=34317
Pinturiccio
Devart Team
 
Posts: 2021
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for PostgreSQL