By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,433 Members | 776 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,433 IT Pros & Developers. It's quick & easy.

Better way to check changed values

P: n/a
RP
In my Form, I have 20 or 30 Text Boxes and Combo Boxes. I am using a
tabbed interface. When the Form's Close button is clicked, I want to
check whether user attempted an entry in any of the Text Boxes or not.
If yes, a dialog box appears to ask whether user wants to Save the
entries or not.

There is also a data grid with one Code field that is a primary key.
Suppose, a user clicks on any row of the data grid, its column values
get filled in the above Text Boxes. If he changes any of the Text Box
values, then on Form Close when Save option is selected, the existing
record gets updated.

I don't want to use multiple flags and don't want multiple calls to
data-access layer. Any optimized way?
Jan 24 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,
And what happens if he select one row, change it and then select another
row?

You have to keep track of the changes anyway, I think that with only one
flag you could do it. Both before closing and when changing the selected row
you should check for this flag.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"RP" <rp*********@gmail.comwrote in message
news:ee**********************************@f47g2000 hsd.googlegroups.com...
In my Form, I have 20 or 30 Text Boxes and Combo Boxes. I am using a
tabbed interface. When the Form's Close button is clicked, I want to
check whether user attempted an entry in any of the Text Boxes or not.
If yes, a dialog box appears to ask whether user wants to Save the
entries or not.

There is also a data grid with one Code field that is a primary key.
Suppose, a user clicks on any row of the data grid, its column values
get filled in the above Text Boxes. If he changes any of the Text Box
values, then on Form Close when Save option is selected, the existing
record gets updated.

I don't want to use multiple flags and don't want multiple calls to
data-access layer. Any optimized way?

Jan 24 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.