Click here to Skip to main content
15,899,475 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: ERROR: InvalidProgramException Pin
Aaron VanWieren18-Jan-07 3:35
Aaron VanWieren18-Jan-07 3:35 
GeneralRe: ERROR: InvalidProgramException Pin
ednrgc18-Jan-07 3:38
ednrgc18-Jan-07 3:38 
GeneralRe: ERROR: InvalidProgramException Pin
Aaron VanWieren18-Jan-07 3:42
Aaron VanWieren18-Jan-07 3:42 
GeneralRe: ERROR: InvalidProgramException Pin
Dave Kreskowiak18-Jan-07 4:47
mveDave Kreskowiak18-Jan-07 4:47 
GeneralRe: ERROR: InvalidProgramException Pin
Aaron VanWieren18-Jan-07 4:58
Aaron VanWieren18-Jan-07 4:58 
GeneralRe: ERROR: InvalidProgramException Pin
Dave Kreskowiak18-Jan-07 4:39
mveDave Kreskowiak18-Jan-07 4:39 
GeneralRe: ERROR: InvalidProgramException Pin
Aaron VanWieren18-Jan-07 4:56
Aaron VanWieren18-Jan-07 4:56 
QuestionBindingSource with Combo - how to clear the combo intiailly Pin
Umair Ahmad17-Jan-07 2:50
Umair Ahmad17-Jan-07 2:50 
I have a fairly standard forms-based application with a lot of data-bound combos (DropDownList style) in it. Everything works fine except when the form is used to edit a 'new' object. In that case, all the form fields should be cleared. But combos dont show in cleared state, they just keep displaying the first value in the list. So now the user thinks that a value is already selected for him, but the application doesnt actually update the bound property of the object unless some other value is selected in the combo.

Lets say I have these two classes in my app.
<br />
class SelItem<br />
{<br />
public string Id { get; set; }<br />
}<br />
<br />
class MyObj<br />
{<br />
public SelItem Selection { get; set; }<br />
}<br />

To fill the drop down list of the combo i use (Id is a string property of the objects im passing through valuesList):
<br />
combo.DisplayMember = "Id";<br />
combo.DataSource = valuesList; // an array of SelItem<br />

and using the forms designer I've bound the Text & SelectedValue of the combobox in this way (bindingSource contains a list of MyObj):
<br />
combo.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", bindingSource, "Selection", true));<br />
combo.DataBindings.Add(new System.Windows.Forms.Binding("Text", bindingSource, "Selection.Id", true));<br />

Currently, I'm clearing the combo-boxes by setting their SelectedIndex property to -1 every time a 'new' form is launched, but thats just a hack. Anyone got an idea why isnt the combo taking care of this automatically.
QuestionMMC Debuging Problem. Pin
PSK_16-Jan-07 22:57
PSK_16-Jan-07 22:57 
QuestionWrinting VB code in a Window Service Pin
tonymathewt16-Jan-07 20:28
professionaltonymathewt16-Jan-07 20:28 
AnswerRe: Wrinting VB code in a Window Service Pin
Guffa17-Jan-07 20:20
Guffa17-Jan-07 20:20 
QuestionRe: Wrinting VB code in a Window Service [modified] Pin
tonymathewt17-Jan-07 22:52
professionaltonymathewt17-Jan-07 22:52 
AnswerRe: Wrinting VB code in a Window Service Pin
Dave Kreskowiak18-Jan-07 4:32
mveDave Kreskowiak18-Jan-07 4:32 
GeneralRe: Wrinting VB code in a Window Service Pin
tonymathewt18-Jan-07 15:56
professionaltonymathewt18-Jan-07 15:56 
GeneralRe: Wrinting VB code in a Window Service Pin
Dave Kreskowiak18-Jan-07 17:22
mveDave Kreskowiak18-Jan-07 17:22 
GeneralRe: Wrinting VB code in a Window Service Pin
tonymathewt19-Jan-07 0:25
professionaltonymathewt19-Jan-07 0:25 
GeneralRe: Wrinting VB code in a Window Service Pin
Dave Kreskowiak19-Jan-07 2:14
mveDave Kreskowiak19-Jan-07 2:14 
QuestionRe: Wrinting VB code in a Window Service Pin
tonymathewt19-Jan-07 16:23
professionaltonymathewt19-Jan-07 16:23 
AnswerRe: Wrinting VB code in a Window Service Pin
Dave Kreskowiak20-Jan-07 3:52
mveDave Kreskowiak20-Jan-07 3:52 
QuestionRe: Wrinting VB code in a Window Service Pin
tonymathewt21-Jan-07 20:51
professionaltonymathewt21-Jan-07 20:51 
AnswerRe: Wrinting VB code in a Window Service Pin
Dave Kreskowiak22-Jan-07 1:47
mveDave Kreskowiak22-Jan-07 1:47 
GeneralRe: Wrinting VB code in a Window Service Pin
tonymathewt24-Jan-07 1:00
professionaltonymathewt24-Jan-07 1:00 
AnswerRe: Wrinting VB code in a Window Service Pin
Guffa18-Jan-07 6:27
Guffa18-Jan-07 6:27 
QuestionRe: Wrinting VB code in a Window Service [modified] Pin
tonymathewt18-Jan-07 15:52
professionaltonymathewt18-Jan-07 15:52 
AnswerRe: Wrinting VB code in a Window Service Pin
Guffa19-Jan-07 5:37
Guffa19-Jan-07 5:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.