TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
leonid 0
NA
6
0
Binding a single DataRow to form members
Mar 11 2005 4:58 AM
Hi! I use a popup form to edit a single row of a DataTable. This is how i open the popup System.Data.DataRow oNewRow = oDataTableObject.NewRow(); oDataTableObject.Rows.Add(oNewRow); // Pass the row object to the constructor of the popup form MyForm oFrmDialog = new MyForm(oNewRow); oFrmDialog.ShowDialog(this); In the popup form i add some databindings. i.e.: //Note: oEditRow is the DataRow object passed over to the constructor //while instantiating the popup form Binding dbComment = new Binding("Text", oEditRow["comment"],"" ); dbComment.Format += new ConvertEventHandler(NullToEmptyString); dbComment.Parse += new ConvertEventHandler(EmptyStringToNull); this.txtComment.DataBindings.Add(dbComment ) And here is the Problem: When i edit the text box txtComment, any change i make is resetted when i leave the text box. In ecample i type in 'Foo Bar'. When the focus moves to another control, the conten of the text box is reset to en empty string. Thanks in advance Gernot
Reply
Answers (
0
)
Index was outside the bounds of array
ntext vs. nchar