PC Review


Reply
Thread Tools Rate Thread

how to determine if the rows selected in a simple multi-selectlistbox have been changed?

 
 
franc sutherland
Guest
Posts: n/a
 
      14th Feb 2011
Hi,
I want to find a way to determine if the rows selected in an unbound
simple multiselect listbox has been changed by the user.
There are ten options in the listbox.
Selecting rows changes the entries in a table using DELETE and INSERT
sql statements.
I want to be able to check if the user has made any changes and ask
them to confirm the changes before applying the DELETE and INSERT
statements.
Many thanks,
Franc.
 
Reply With Quote
 
 
 
 
Mike Painter
Guest
Posts: n/a
 
      14th Feb 2011
franc sutherland wrote:
> Hi,
> I want to find a way to determine if the rows selected in an unbound
> simple multiselect listbox has been changed by the user.
> There are ten options in the listbox.
> Selecting rows changes the entries in a table using DELETE and INSERT
> sql statements.
> I want to be able to check if the user has made any changes and ask
> them to confirm the changes before applying the DELETE and INSERT
> statements.
> Many thanks,
> Franc.


The dirty property should give you what you want.
However making a change and then deleting teh record seems meaningles and
you usually inseret a new record. INserting a changed record may lead to
problems.


 
Reply With Quote
 
franc sutherland
Guest
Posts: n/a
 
      15th Feb 2011
On Feb 14, 9:50*pm, "Mike Painter" <md.pain...@sbcglobal.net> wrote:
> franc sutherland wrote:
> > Hi,
> > I want to find a way to determine if the rows selected in an unbound
> > simple multiselect listbox has been changed by the user.
> > There are ten options in the listbox.
> > Selecting rows changes the entries in a table using DELETE and INSERT
> > sql statements.
> > I want to be able to check if the user has made any changes and ask
> > them to confirm the changes before applying the DELETE and INSERT
> > statements.
> > Many thanks,
> > Franc.

>
> The dirty property should give you what you want.
> However making a change and then deleting teh record seems meaningles and
> you usually inseret a new record. INserting a changed record may lead to
> problems.


Hi Mike,
Thanks for responding.
The dirty property doesn't work. I think that is because the listbox
is not bound to the underlying form's data.
I probably didn't make myself clear before. I don't insert a changed
record. When the user clicks on an item in the list box, it either
removes that table entry or adds in a new one, depending on whether it
has become selected or de-selected.
Franc.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
determine selected child rows in datagrid juustagirl@yahoo.com Microsoft Dot NET Framework Forms 0 13th Jul 2006 10:49 PM
How to determine whether the user has already selected an option from a multi select list Patrick Olurotimi Ige Microsoft ASP .NET 6 11th Mar 2005 10:39 AM
Determine Selected Rows in DataGrid C# Clive Godden Microsoft Dot NET Framework Forms 1 18th Jan 2005 01:42 PM
How to determine when selected rows in a datagrid have changed ??? BBFrost Microsoft C# .NET 3 21st Oct 2004 01:23 PM
How to determine that rows on server changed and dataset needs to be updated ? Grigol Avetikov Microsoft ADO .NET 2 26th Apr 2004 03:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 PM.