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

.NET (Core and Framework)

 
AnswerRe: Class Diagram option needed Pin
Colin Angus Mackay10-Apr-07 3:02
Colin Angus Mackay10-Apr-07 3:02 
AnswerRe: Class Diagram option needed Pin
Jaiprakash M Bankolli10-Apr-07 3:31
Jaiprakash M Bankolli10-Apr-07 3:31 
AnswerRe: Class Diagram option needed Pin
ltadeu10-Apr-07 6:41
ltadeu10-Apr-07 6:41 
Question.NET 3.0 dockable Toolbar needed Pin
Mohinil10-Apr-07 1:24
Mohinil10-Apr-07 1:24 
GeneralRe: .NET 3.0 dockable Toolbar needed Pin
sthotakura12-Apr-07 4:02
sthotakura12-Apr-07 4:02 
Question.net roadmap Pin
bigeyed9-Apr-07 19:01
bigeyed9-Apr-07 19:01 
AnswerRe: .net roadmap Pin
Jaiprakash M Bankolli10-Apr-07 3:32
Jaiprakash M Bankolli10-Apr-07 3:32 
QuestionRetaining invalid data in bound controls Pin
sthomaso9-Apr-07 7:46
sthomaso9-Apr-07 7:46 
I'm of the opinion that users should be able to TEMPORARILY have invalid data in a bound control. To enable this, I set Form.AutoValidate to EnableAllowFocusChange so they can leave a control even if there is invalid data. I bind these controls to an object that implements IDataErrorInfo & INotifyPropertyChanged, with property procedures like this:

Private _x As Double
Public Property X() As Double
  Get
    Return _x
  End Get
  Set(ByVal value As Double)
    If _x <> value Then
      If value < 0 OrElse value > 10 Then
        _item("X") = "X must be between 0 and 10!" ' For IDataErrorInfo.Item
      Else
        _item("X") = ""
        _x = value
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("X"))
      End If
    End If
  End Set
End Property


Now let's say I enter an "a" into a textbox bound to this property, then I tab out of the textbox into another bound control, edit it, and then leave THAT control, too. This causes the controls to be refreshed with the value of the properties, which means that my invalid "a" gets changed to zero, the value of _x.

My question is: How can I set things up so the invalid "a" gets left in the control until the user decides to re-enter it and change the value?
---scott
QuestionXml, Listboxs, and changing backgrounds Pin
Czanchez9-Apr-07 7:42
Czanchez9-Apr-07 7:42 
QuestionVB.Net [modified] Pin
Bishwajeet Roy9-Apr-07 2:02
Bishwajeet Roy9-Apr-07 2:02 
QuestionStandard Encryption method which takes 3 parameters in .net [modified] Pin
Kusumasrinivas8-Apr-07 23:29
Kusumasrinivas8-Apr-07 23:29 
AnswerRe: Standard Encryption method which takes 3 parameters in .net Pin
Colin Angus Mackay9-Apr-07 1:57
Colin Angus Mackay9-Apr-07 1:57 
QuestionImmediate Window Pin
Akhilesh Yadav8-Apr-07 23:27
Akhilesh Yadav8-Apr-07 23:27 
AnswerRe: Immediate Window Pin
Akhilesh Yadav9-Apr-07 0:10
Akhilesh Yadav9-Apr-07 0:10 
QuestionSmooth corner control! Pin
caiter7-Apr-07 16:20
caiter7-Apr-07 16:20 
AnswerRe: Smooth corner control! Pin
Jaiprakash M Bankolli10-Apr-07 3:34
Jaiprakash M Bankolli10-Apr-07 3:34 
GeneralRe: Smooth corner control! Pin
caiter10-Apr-07 3:39
caiter10-Apr-07 3:39 
GeneralRe: Smooth corner control! Pin
Jaiprakash M Bankolli10-Apr-07 3:47
Jaiprakash M Bankolli10-Apr-07 3:47 
QuestionCOM Invoke and the .NET Framework Pin
Ray Kinsella7-Apr-07 4:42
Ray Kinsella7-Apr-07 4:42 
Questionfix application scriptmap and fix path? Pin
Ghalib Ghuneim6-Apr-07 13:40
Ghalib Ghuneim6-Apr-07 13:40 
QuestionRun a win32 app remotely? Pin
Ryno Burger5-Apr-07 20:50
Ryno Burger5-Apr-07 20:50 
AnswerRe: Run a win32 app remotely? Pin
Dave Kreskowiak6-Apr-07 4:45
mveDave Kreskowiak6-Apr-07 4:45 
AnswerRe: Run a win32 app remotely? Pin
Not Active6-Apr-07 5:11
mentorNot Active6-Apr-07 5:11 
QuestionAbout Windows Presentation Foundation. Pin
caiter5-Apr-07 4:12
caiter5-Apr-07 4:12 
AnswerRe: About Windows Presentation Foundation. Pin
caiter5-Apr-07 9:37
caiter5-Apr-07 9: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.