Click here to Skip to main content
15,888,908 members
Home / Discussions / C#
   

C#

 
AnswerRe: c# get method object by address from C++ program Pin
BobJanova7-Apr-14 2:57
BobJanova7-Apr-14 2:57 
QuestionAdvantages of using virtual method in base class? Pin
Varun Thakur7-Apr-14 0:01
Varun Thakur7-Apr-14 0:01 
AnswerRe: Advantages of using virtual method in base class? PinPopular
OriginalGriff7-Apr-14 0:37
mveOriginalGriff7-Apr-14 0:37 
GeneralRe: Advantages of using virtual method in base class? Pin
Varun Thakur7-Apr-14 18:48
Varun Thakur7-Apr-14 18:48 
AnswerRe: Advantages of using virtual method in base class? Pin
pallelokanathareddy8-Apr-14 6:43
professionalpallelokanathareddy8-Apr-14 6:43 
QuestionHow to merger data from two sql databases that have a same structure ? Pin
taibc6-Apr-14 23:59
taibc6-Apr-14 23:59 
AnswerRe: How to merger data from two sql databases that have a same structure ? Pin
Peter Leow7-Apr-14 0:08
professionalPeter Leow7-Apr-14 0:08 
Questiondatagridview doesn´t show the datasource Pin
tom_ma6-Apr-14 21:40
tom_ma6-Apr-14 21:40 
i´m trying to bind a list to a datagridview. i do that:

C#
public void seedatagrid(List<myClass> liste2)
{
    dgv_TraceItems.DataSource =liste2;
}


and the datagridview has the data, but it doesn´t show anything.

could you help me?? how can i resolve the problem?? thank you

the class

C#
public enum TYPE
{
    normal= 1,
    especial= 3, 
    low= 6, 
    high= 7,          
}


public class myClass : INotifyPropertyChanged
{

    private byte number;
    private TYPE type;
    private string file;
    private bool isselected;

    public event PropertyChangedEventHandler PropertyChanged;

    public byte Number
    {
        get
        {
            return this.number;
        }
        set
        {
            this.number= value;
            this.OnPropertyChanged("Number");
        }
    }

    public TYPE Type
    {
        get
        {
            return this.type;
        }
        set
        {
            this.type = value;
            this.OnPropertyChanged("Type");
        }
    }

    public string File
    {
        get
        {
            return this.file;
        }
        set
        {
            this.file = value;
            this.OnPropertyChanged("File");
        }
    }

    public bool IsSelected
    {
        get
        {
            return this.isselected;
        }
        set
        {
            this.isselected = value;
            this.OnPropertyChanged("IsSelected");
        }
    }

    public myClass(UInt32 Data, string Text)
    {            
        this.number = (byte)((Data & 0x0000FF00) >> 8);
        this.type = (TYPE)((Data & 0x00FF0000) >> 16);
        this.file = Text;

    }

    private void OnPropertyChanged(string propertyName)
    {
        if (this.PropertyChanged != null)
        {
            this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }
    }


i have tried to make a datatable with the list and the datagridview doesn´t show anything. i don´t know what happends , but i have a problem with the datagridview
AnswerRe: datagridview doesn´t show the datasource Pin
V.6-Apr-14 22:13
professionalV.6-Apr-14 22:13 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma6-Apr-14 22:34
tom_ma6-Apr-14 22:34 
GeneralRe: datagridview doesn´t show the datasource Pin
V.6-Apr-14 22:45
professionalV.6-Apr-14 22:45 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma7-Apr-14 0:24
tom_ma7-Apr-14 0:24 
GeneralRe: datagridview doesn´t show the datasource Pin
V.7-Apr-14 1:19
professionalV.7-Apr-14 1:19 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma7-Apr-14 0:24
tom_ma7-Apr-14 0:24 
AnswerRe: datagridview doesn´t show the datasource Pin
OriginalGriff6-Apr-14 22:27
mveOriginalGriff6-Apr-14 22:27 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma6-Apr-14 22:38
tom_ma6-Apr-14 22:38 
GeneralRe: datagridview doesn´t show the datasource Pin
OriginalGriff6-Apr-14 23:00
mveOriginalGriff6-Apr-14 23:00 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma6-Apr-14 23:08
tom_ma6-Apr-14 23:08 
GeneralRe: datagridview doesn´t show the datasource Pin
OriginalGriff6-Apr-14 23:24
mveOriginalGriff6-Apr-14 23:24 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma7-Apr-14 0:14
tom_ma7-Apr-14 0:14 
GeneralRe: datagridview doesn´t show the datasource Pin
OriginalGriff7-Apr-14 0:25
mveOriginalGriff7-Apr-14 0:25 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma7-Apr-14 1:38
tom_ma7-Apr-14 1:38 
GeneralRe: datagridview doesn´t show the datasource Pin
OriginalGriff7-Apr-14 1:43
mveOriginalGriff7-Apr-14 1:43 
GeneralRe: datagridview doesn´t show the datasource Pin
tom_ma7-Apr-14 1:55
tom_ma7-Apr-14 1:55 
GeneralRe: datagridview doesn´t show the datasource Pin
OriginalGriff7-Apr-14 2:19
mveOriginalGriff7-Apr-14 2:19 

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.