Click here to Skip to main content
15,896,557 members
Home / Discussions / C#
   

C#

 
GeneralRe: SetItemData Pin
bouli31-Oct-04 23:54
bouli31-Oct-04 23:54 
General.xml to .doc,.html,.rtf Pin
makakiu31-Oct-04 5:36
makakiu31-Oct-04 5:36 
GeneralRe: .xml to .doc,.html,.rtf Pin
Christian Graus31-Oct-04 8:26
protectorChristian Graus31-Oct-04 8:26 
QuestionWhat's the problem? Pin
momer31-Oct-04 5:15
momer31-Oct-04 5:15 
AnswerRe: What's the problem? Pin
Stefan Troschuetz31-Oct-04 7:00
Stefan Troschuetz31-Oct-04 7:00 
GeneralRe: What's the problem? Pin
momer31-Oct-04 7:25
momer31-Oct-04 7:25 
GeneralUploade file to server problem! Pin
QzRz31-Oct-04 4:58
QzRz31-Oct-04 4:58 
Generalbound control looses changes after leaving panel Pin
Peter Kiesel31-Oct-04 3:25
Peter Kiesel31-Oct-04 3:25 
Hi All,
I have bound textboxes and other controls on a panel. If I edit the text in a textbox and move on to another control, everything works fine and I can use
HasVersion(DataRowVersion.Proposed)
to determine if there have been any changes to any control.
BUT, if I make only a single change to one text control and leave the panel afterwards by clicking into another panel on the screen, the proposed version flag is not set and I'm missing to save the change to the underlying dataset and database.

Binding:
txtCode.DataBindings.Add("Text", m_vProject, "code");
...
and after leaving the panel:
BindingManagerBase bm = BindingContext[m_vProject];
cPrjDs.tProjectRow prjRow = (cPrjDs.tProjectRow)(((DataRowView)bm.Current).Row);
if (prjRow.HasVersion(DataRowVersion.Proposed)) {
if (MessageBox.Show("save changes?", "header", ...)) {
bm.EndCurrentEdit();

To my understanding, it would be possible to catch the TextChanged event of the control and start DataRow.BeginEdit(), but this does not seem to be a practical solution for lots of controls.

Thanks for any help.


Peter

GeneralOverflow exception Pin
Ahmed Galal31-Oct-04 1:26
Ahmed Galal31-Oct-04 1:26 
GeneralRe: Overflow exception, a question Pin
yoaz31-Oct-04 2:20
yoaz31-Oct-04 2:20 
GeneralRe: Overflow exception, a question Pin
Ahmed Galal31-Oct-04 21:49
Ahmed Galal31-Oct-04 21:49 
GeneralDataSet - scalability Pin
devvvy30-Oct-04 23:14
devvvy30-Oct-04 23:14 
GeneralRe: DataSet - scalability Pin
Alex Korchemniy31-Oct-04 9:40
Alex Korchemniy31-Oct-04 9:40 
GeneralRe: DataSet - scalability Pin
devvvy31-Oct-04 16:49
devvvy31-Oct-04 16:49 
GeneralStreet level mapping Pin
parrot12330-Oct-04 20:48
parrot12330-Oct-04 20:48 
GeneralRe: Street level mapping Pin
Colin Angus Mackay31-Oct-04 2:00
Colin Angus Mackay31-Oct-04 2:00 
GeneralApplication.EnableVisualStyles and Toolbar icons Pin
steve_rm30-Oct-04 20:08
steve_rm30-Oct-04 20:08 
GeneralRetriving Text Pin
abdo12345678930-Oct-04 11:20
abdo12345678930-Oct-04 11:20 
GeneralExecuting a file from an interface Pin
Kiran Satish30-Oct-04 11:05
Kiran Satish30-Oct-04 11:05 
GeneralRe: Executing a file from an interface Pin
Alex Korchemniy30-Oct-04 13:41
Alex Korchemniy30-Oct-04 13:41 
GeneralRe: Executing a file from an interface Pin
Kiran Satish31-Oct-04 7:13
Kiran Satish31-Oct-04 7:13 
GeneralRe: Executing a file from an interface Pin
Alex Korchemniy31-Oct-04 9:23
Alex Korchemniy31-Oct-04 9:23 
GeneralRe: Executing a file from an interface Pin
Kiran Satish31-Oct-04 9:49
Kiran Satish31-Oct-04 9:49 
GeneralNeed idea for a neural network... Pin
tom_dx30-Oct-04 10:52
tom_dx30-Oct-04 10:52 
GeneralRe: Need idea for a neural network... Pin
Alex Korchemniy30-Oct-04 11:01
Alex Korchemniy30-Oct-04 11:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.