Simple event question....

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Is it possible to determine whether a SelectIndexChanged event was
caused by a user making a selection or something changing in the
DataSet to which it is connected? I checked e:EventArgs and
sender:Object, but e is empty and I don't see anything helpful in
sender.

In my event handler for SomeCombo_SelectedIndexChanged, I need to be
able to do certain things *only* if it was the user that changed the
selection, not if the event is firing because the connected DataSet
changed.

Thanks!
 
If your talking about a ComboBox...

try using the SelectionChangeCommitted event:
this.cmbAttribute1.SelectionChangeCommitted += new
System.EventHandler(this.attr_Selected)

HTH,
Eric Cadwell
http://www.origincontrols.com
 
Thanks,

So I'll create a custom style column. Would you suggest using the
click/double click events or would any of the other mouse events be better?

Yes, PositionChanged should work. I already use it for retrieving data for
the current record. What I can't figure out is why PositionChanged (or is it
CurrentChanged) fires not once, but several times. But that goes for some
other events as well. Which leads me to one more question about new rows and
the leave event, but I'll post that one seperately

Regards,

Kenneth
 
Forget the previous posting. Seletcted the wrong thread.

Kenneth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top