Re: Newbie Question: Distinguishing between user click and binding context position change
From: Rajesh Patel (rdp647_at_hotmail.com)
Date: 12/14/04
- Next message: Clown: "databinding question-obviously"
- Previous message: mboizeau_at_free.fr: "Re: Sample code request (C#)"
- In reply to: Eric: "Newbie Question: Distinguishing between user click and binding context position change"
- Next in thread: Eric: "Re: Newbie Question: Distinguishing between user click and binding context position change"
- Reply: Eric: "Re: Newbie Question: Distinguishing between user click and binding context position change"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Dec 2004 17:13:16 -0500
I believe basically you want to perform actions on combobox if user changes
them, not because of bindingcontext change.
There are 2 possible solutions I can think,
1. Use Removehandler and addhandler for all combobox. use removehandler in
listbox before you start poplulate details' combobox and addhandler as soon
as you finished binding combobox with details' records.
2. use boolean variable blnByBinidingcontext. before you populate values
for comboboxes make this variable true. after binding every combobox make it
again false. This variable should be private at class level. Check this
boolean variable in combobox's selectedindexchanged event. if
blnByBinidingcontext = true then exit procedure.
Regards,
Rajesh Patel
<Eric> wrote in message news:O0gdWtV4EHA.1204@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> I have a master/detail form using a typed DataSet-a ListBox with the
> "master" records and several ComboBoxes with "detail" records. On the
> SelectedIndexChanged handler for the ListBox, it selects the appropriate
> detail records in the ComboBoxes. This, of course, raises a
> SelectedIndexChanged for the detail ComboBoxes.
>
> How, then, can I know if the detail ComboBoxes' SelectedIndexChanged
events
> fired because the user changed them or because the binding context changed
> them by changing the master record's position?
>
> Thank you,
>
> Eric
>
>
- Next message: Clown: "databinding question-obviously"
- Previous message: mboizeau_at_free.fr: "Re: Sample code request (C#)"
- In reply to: Eric: "Newbie Question: Distinguishing between user click and binding context position change"
- Next in thread: Eric: "Re: Newbie Question: Distinguishing between user click and binding context position change"
- Reply: Eric: "Re: Newbie Question: Distinguishing between user click and binding context position change"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|