C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Input Data Binding

rated by 0 users
This post has 8 Replies | 1 Follower

Top 500 Contributor
Posts 19
LimarOT Posted: Wed, Mar 4 2009 9:12 PM

Hi

Not sure if this should be in the Data Objects or Input forum but here is my problem..

I have a Input Panel bound to a data library and all works fine except the data is updated automatically...

I have add the line dset.Update to the Ok button which I thought would be where the update would happen, but when I use the cancel button the data is still updated?

C1Data.2 version 2.0.20091.212

C1Input.2 version 2.020083.33223

C1InputPanel version 2.0.20091.57

Regards

Graham

 

Top 10 Contributor
Posts 1,090
C1_JohnAd replied on Thu, Mar 5 2009 12:46 AM
 
Hello,
 
If I assume correctly, you are making use of the default buttons of InputDataNavigator. I  think you can proably try using the
Update() method in the Save Button option. Enable the Save button for the DataNavigator by setting the 'ShowSaveButton' to
True. You can then put the Update() method in the SaveData event of the InputDataNavigator.
 
I hope this will help. In case the issue persists, you can provide us a sample attachment showing the behavior. Or you can
send in your query to our support team at support@componentone.com.
 
Regards,
John Adams
<LimarOT> wrote in message news:215053@10.0.1.98...

Hi

Not sure if this should be in the Data Objects or Input forum but here is my problem..

I have a Input Panel bound to a data library and all works fine except the data is updated automatically...

I have add the line dset.Update to the Ok button which I thought would be where the update would happen, but when I use the cancel button the data is still updated?

C1Data.2 version 2.0.20091.212

C1Input.2 version 2.020083.33223

C1InputPanel version 2.0.20091.57

Regards

Graham

 



http://helpcentral.componentone.com/cs/forums/p/78426/215053.aspx#215053

Top 500 Contributor
Posts 19
LimarOT replied on Thu, Mar 5 2009 3:24 AM

Hi John

Hi John 

Yes that fixed my problem... the Input Panel was added to an existing Dialog Form so I thought putting the logic on the exit button would work...

One more problem... I have dataset and dataview for the file I am using.. I am trying to use RowFilter to select the file to maintain on entry (form load)

dataview.RowFilter = "ComponentID = " & dbtext(sComponentID)    .... dbtext function surrounds the text in quotes and remove unwanted chars...

but the row dispaly always starts at the 1st record!

 Any hints please

Graham

 

Top 10 Contributor
Posts 1,645
Hi,

> but the row dispaly always starts at the 1st record!

What does it mean and what did you expect to see?
Please describe the problem in more detail.

Regards,

-Andrey
Top 500 Contributor
Posts 19
LimarOT replied on Thu, Mar 5 2009 5:31 AM

Hi John

The form I am using is used in multiple places within the project and can be used to do various options depending on where called from, for example

  1. Add new 'component'
  2. Review/Modify a 'single' component
  3.  Review/Modify 'ALL' components

'Components' are like inventory items...

So when I wish to allow the user to 'review/modify' a single component the '1 of 1' should be displayed for the RowFilter selection as described before....

I change the options available for the 'component form' depending on the requested 'change' mode from the 'initiating forms' using the form load event.. ie add new, modify one, modify/review all...

Hope this makes more sense..

regards

Graham

 

Top 10 Contributor
Posts 1,645
Hi Graham,

> So when I wish to allow the user to 'review/modify' a single component the '1 of 1' should
> be displayed for the RowFilter selection as described before....

OK. So what's problem? The RowFilter selection doesn't work?

Regards,

-Andrey
Top 500 Contributor
Posts 19
LimarOT replied on Thu, Mar 5 2009 6:04 AM

Hi Andrey

The problem is 'all' rows are still selected and '1 of 867' is displayed.... not the single record selected via the rowfilter even though the the form load does execute the statement (checked via debug and correect syntax)... 

 Sorry if I didnt explain better, I am from the 'old' school of programming using 'pick' database ... :) :) :)

Still learning SQL... :( ... hehehe

Regards

Graham

 

 

Top 10 Contributor
Posts 1,645
Hi Graham,

> The problem is 'all' rows are still selected and '1 of 867' is displayed.... not the single
> record selected via the rowfilter even though the the form load does execute the statement

You may try two things:

C1DataView.IsDefault = True

or

bind all data-edit Controls (such as DBNavigator and others) to the C1DataView
component, not to C1DataSet.

Regards,

-Andrey
Top 500 Contributor
Posts 19
LimarOT replied on Thu, Mar 5 2009 7:11 AM

Ok all now works

  1. Set IsDefault = True, and set TableViewName=Components (was TableName)
  2. The above doesnt work for isDefault=false

 Many thanks..

Graham

 

Page 1 of 1 (9 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.