Click here to Skip to main content
15,881,380 members
Home / Discussions / C#
   

C#

 
GeneralRe: \r\n to Pin
AspDotNetDev14-May-10 9:28
protectorAspDotNetDev14-May-10 9:28 
GeneralRe: \r\n to Pin
Xmen Real 14-May-10 18:26
professional Xmen Real 14-May-10 18:26 
GeneralRe: \r\n to Pin
AspDotNetDev14-May-10 18:28
protectorAspDotNetDev14-May-10 18:28 
GeneralRe: \r\n to Pin
Xmen Real 14-May-10 18:30
professional Xmen Real 14-May-10 18:30 
GeneralRough solution but works Pin
Xmen Real 14-May-10 18:59
professional Xmen Real 14-May-10 18:59 
GeneralRe: Rough solution but works Pin
AspDotNetDev17-May-10 17:02
protectorAspDotNetDev17-May-10 17:02 
GeneralRe: Rough solution but works Pin
Xmen Real 17-May-10 18:07
professional Xmen Real 17-May-10 18:07 
QuestionExtending Entity Data Model Pin
Sevententh14-May-10 4:24
Sevententh14-May-10 4:24 
I'm trying to understand why part of my code will not work, on a partial class from a (service) EDM object table on the clientside. So here is the code:
    public partial class tblSOM_Supplier
    {
        #region IDataErrorInfo Members
        public string Error
        {
            get { return ValidationHelper.GetError(SelfValidate()); }
        }

        public string this[string columnName]
        {
            get
            {
                var __ValidationResults = SelfValidate();
                if (__ValidationResults == null) return string.Empty;
                var __ColumnResults = __ValidationResults.Errors.FirstOrDefault<ValidationFailure>(x => string.Compare(x.PropertyName, columnName, true) == 0);

                return __ColumnResults != null ? __ColumnResults.ErrorMessage : string.Empty;
            }
        }
        #endregion
}
The problem is the public string this[string columnName] part. It doesn't recognise any of the properties from the table tblSOM_Supplier
If I add a property
public String ThisTestProperty { get; set; }
to this partial class then it works exactly as it should! (Showing validation error on the TextBox)
How can I get the EDM properties to function correctly in this modified partial class?
AnswerRe: Extending Entity Data Model Pin
Sevententh17-May-10 1:26
Sevententh17-May-10 1:26 
QuestionMessage Removed Pin
14-May-10 3:47
roman_s14-May-10 3:47 
AnswerRe: Pin
Johnny J.14-May-10 4:01
professionalJohnny J.14-May-10 4:01 
GeneralRe: Pin
roman_s14-May-10 4:11
roman_s14-May-10 4:11 
GeneralRe: Pin
Johnny J.14-May-10 4:18
professionalJohnny J.14-May-10 4:18 
AnswerRe: Pin
dan!sh 14-May-10 4:02
professional dan!sh 14-May-10 4:02 
GeneralRe: Pin
roman_s14-May-10 4:14
roman_s14-May-10 4:14 
GeneralRe: Pin
dan!sh 14-May-10 4:20
professional dan!sh 14-May-10 4:20 
GeneralRe: Pin
roman_s14-May-10 5:07
roman_s14-May-10 5:07 
GeneralRe: Pin
AspDotNetDev14-May-10 11:16
protectorAspDotNetDev14-May-10 11:16 
GeneralOriginal Question Pin
AspDotNetDev14-May-10 18:27
protectorAspDotNetDev14-May-10 18:27 
QuestionDirectShow Pin
TimSWatson14-May-10 0:56
TimSWatson14-May-10 0:56 
AnswerRe: DirectShow Pin
#realJSOP14-May-10 1:45
mve#realJSOP14-May-10 1:45 
Questionhow to play multiple video files in windows media player using C# Pin
NetMan201214-May-10 0:44
NetMan201214-May-10 0:44 
AnswerRe: how to play multiple video files in windows media player using C# Pin
Rajesh Anuhya14-May-10 1:15
professionalRajesh Anuhya14-May-10 1:15 
QuestionNetworkStream.BeginWrite() blocks as called from thread Pin
Chesnokov Yuriy13-May-10 23:16
professionalChesnokov Yuriy13-May-10 23:16 
AnswerRe: NetworkStream.BeginWrite() blocks as called from thread Pin
#realJSOP14-May-10 1:43
mve#realJSOP14-May-10 1:43 

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.