We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

PercentTextBox Binding

Thread ID:

Created:

Updated:

Platform:

Replies:

14031 May 17,2004 08:30 AM UTC May 20,2004 08:57 PM UTC WinForms 9
loading
Tags: Tools
Eddy Poullet
Asked On May 17, 2004 08:30 AM UTC

Hi, I search to bind a PercentTextBox control to a dataview and update value with no success. The call of the method EndCurrentEdit() doesn''t update the data but reset the previous value. The IntegerTextBox and the TextBox doesn''t show this behaviour. Eddy POULLET V 2.0.5.1

Administrator [Syncfusion]
Replied On May 17, 2004 11:17 AM UTC

Hi EPO, Please refer to the samples attached below : 1. PercentTextBox Sample 2. IntegerTextBox Sample The above samples illustrate how a PercentTextBox and a IntegerTextBox can be databound to a data source and the updates on controls relayed back to the data source. Let me know if you need further assistance. Thanks for considering Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Jerry Lawrence
Replied On May 18, 2004 03:48 PM UTC

Why can''t theDataSet.AcceptChanges() be used in the Validated event of the control? I can use this in the CurrencyTextBox control. >Hi EPO, > >Please refer to the samples attached below : > >1. PercentTextBox Sample > >2. IntegerTextBox Sample > >The above samples illustrate how a PercentTextBox and a IntegerTextBox can be databound to a data source and the updates on controls relayed back to the data source. Let me know if you need further assistance. Thanks for considering Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 19, 2004 12:31 AM UTC

Hi Jerry, Yes, the above approach would update the DataSet/DataView (refer sample that demonstrates this), but it will not update the database at the backend. In order to do that you would have to follow the samples that I sent in my earlier update. Thanks for your continued interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Jerry Lawrence
Replied On May 19, 2004 11:55 AM UTC

I added a PercentTextBox to the form and the following code works fine: this.percentTextBox1.DataBindings.Add("DoubleValue", this.dataView1, "Amount"); I''m still having problems using the DataBindings in the Designer. I used both BindableValue and Text. Neither seems to update the Dataset. After entering a value, the control goes back to 0.00 %. Thanks, Jerry >Hi Jerry, > >Yes, the above approach would update the DataSet/DataView (refer sample that demonstrates this), but it will not update the database at the backend. In order to do that you would have to follow the samples that I sent in my earlier update. Thanks for your continued interest in Syncfusion products. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 19, 2004 12:49 PM UTC

Hi Jerry, I have modified my earlier sample to include a PercentTextBox and have databound it using its Text property in the designer. It seems to work fine. I have attached the modified sample here. Please refer to it and let me know if I am missing something. We appreciate your interest in Syncfusion products. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 19, 2004 12:50 PM UTC

Hi Jerry, The sample attachment did not go through correctly in my previous update. I am reattaching the same here. Let me know if you need further assistance. Regards, Guru Patwal Syncfusion, Inc.

Jerry Lawrence
Replied On May 20, 2004 10:20 AM UTC

This sample does not work on my machine. The PercentTextBox did not have the validated event originally. The dataset is not updated. I changed the DataBindings Text field to dataView1 - Amount in the designer. I added the following event via the designer: private void percentTextBox1_Validated(object sender, System.EventArgs e) { this.dataSet11.AcceptChanges(); } The dataset is still not updated. If I change the designer generated code from: this.percentTextBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.dataView1, "Amount")); to: this.percentTextBox1.DataBindings.Add(new System.Windows.Forms.Binding("DoubleValue", this.dataView1, "Amount")); The dataset updates correctly. Note the change from "Text" to "DoubleValue". I am running VS Net 2003 with Syncfusion 2.0.5.1. Thanks, Jerry W. Lawrence >Hi Jerry, > >The sample attachment did not go through correctly in my previous update. I am reattaching the same here. Let me know if you need further assistance. > >Regards, >Guru Patwal >Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 20, 2004 07:58 PM UTC

Hi Jerry, Thanks for the update. Could you please open an incident in DirectTrac in this regard, and also attach your modified sample there ? I will update you there from now. In future, please address all your concerns through DirectTrac as far as possible. We appreciate your cooperation. Regards, Guru Patwal Syncfusion, Inc.

Administrator [Syncfusion]
Replied On May 20, 2004 08:57 PM UTC

Hi Jeremy, Thanks for the update. I do see that the Validated event handler is missing, and I have made the necessary modifications now. The changes are correctly relayed back to the DataView as illustrated by the DataGrid which is a reflection of the values in the DataView. Please refer to the modified_sample attached here. Make sure that the OleDbDataAdapter is reconfigured, and the OleDbConnection path set to the DB.mdb file. Regenerate the DataSet and reassign DataSet.Table1 to the DataView''s Table property. With respect to designer oriented databinding, I have once again confirmed that the Text property databinding works fine in v2.0.5.1, but BindableValue does not work as expected. I have reported this to the development team, and will update you on this as soon as I more information available. Like I mentioned in my earlier update, please open an incident in DirectTrac on this and I will update you there from now on. Thanks for your cooperation. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;