Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For confidential or other support please email.
The time now is Sat Jul 04, 2009 4:29 pm
 <b>Register</b> (required to post and download)Register (required to post and download)
 Username:    Password:   Remember login       
 FAQFAQ   SearchSearch   DigestsDigests 
Insert duplicate row?
To watch this topic for replies  Register (enables digests) or give email address:
Reply to topic    Home -> Forums -> Support -> Storage & search: Instant JChem -> Insert duplicate row?

Display posts from previous:        View previous topic :: View next topic    
Author Message
dkchalmers
Joined: 22 Feb 2007
Posts: 48


View user's profile



Back to top
Post subject: Insert duplicate row?
Link to postPosted: Wed Aug 06, 2008 3:05 am  Reply with quote

Dear all (Tim),

Is there a simple way to insert a new, duplicate row into a table? It would be useful to be able to copy an entire row and paste it back into the table.

Regards

David
pzajac
Joined: 03 Aug 2007
Posts: 24
IJC personnel

View user's profile



Back to top
Post subject:
Link to postPosted: Wed Aug 06, 2008 7:18 am  Reply with quote

You can use Copy and Past actions in gridview:
1) Show all writable fields in gridview
2) Select data in source row
3) Past it to other row

Petr
dkchalmers
Joined: 22 Feb 2007
Posts: 48


View user's profile



Back to top
Post subject:
Link to postPosted: Wed Aug 06, 2008 7:34 am  Reply with quote

Hi Petr,

The problem with gridview is that I have a relational database with chemical compounds in one table and associated packages in a separate table. I would like to create a duplicate package record from the form view because the package table does not include the actual chemical information - only the specific package information.

Does that make sense?

Cheers

David
tdudgeon
Joined: 05 Oct 2004
Posts: 775
IJC personnel

View user's profile

Visit poster's website

Back to top
Post subject:
Link to postPosted: Wed Aug 06, 2008 1:25 pm  Reply with quote

Hi David,

The ability to duplicate a row has previously been suggested and we plan to implement this.

For now though I think Petr's suggestiuon of using copy and paste should work, assuming I have understood your needs correctly.
If you have a structure table and a detail table that contains your package data and this package table has a many-to-one relationship to the structure table (which presumably it must if you are trying to add a second row) then you can create a form that contains the structues and a table widget that contains the package info. In that table widget you should be able to use copy and paste to create a new row with the same values as the copied row.
But of course a "add new row like this one" function would be simpler.

Tim
Display posts from previous:   
Reply to topic    Home -> Forums -> Storage & search: Instant JChem -> Insert duplicate row? All times are GMT + 1 Hour
Page 1 of 1
To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum