Click here to Skip to main content
16,006,605 members
Home / Discussions / C#
   

C#

 
GeneralRe: DefaultValueAtribute Pin
mav.northwind15-Mar-07 9:54
mav.northwind15-Mar-07 9:54 
GeneralRe: DefaultValueAtribute Pin
alexeychik200115-Mar-07 10:03
alexeychik200115-Mar-07 10:03 
GeneralRe: DefaultValueAtribute Pin
Sean Michael Murphy15-Mar-07 10:31
Sean Michael Murphy15-Mar-07 10:31 
GeneralRe: DefaultValueAtribute Pin
alexeychik200115-Mar-07 10:46
alexeychik200115-Mar-07 10:46 
GeneralRe: DefaultValueAtribute Pin
Sean Michael Murphy15-Mar-07 11:22
Sean Michael Murphy15-Mar-07 11:22 
Questionfilesystem listview Pin
alpdoruk15-Mar-07 8:24
alpdoruk15-Mar-07 8:24 
AnswerRe: filesystem listview Pin
Ed.Poore19-Mar-07 13:10
Ed.Poore19-Mar-07 13:10 
QuestionComboBox & DataBindings Problem Pin
Urfinek15-Mar-07 8:15
Urfinek15-Mar-07 8:15 
Hi all,

I have some problem with binded ComboBox:

I have class GsmNumber:

class GsmNumber
{
    // ..... //

    private int? _CompanyID;
    public int? CompanyID
    {
        get { return _CompanyID; }
        set { _CompanyID = value; }
    }
}


And Company class:

class Company
{
    private int _CompanyID;

    public int CompanyID
    {
        get { return _CompanyID; }
        set { _CompanyID = value; }
    }

    private string _CompanyName;

    public string CompanyName
    {
        get { return _CompanyName; }
        set { _CompanyName = value; }
    }

    public static List<Company> GetCompanyList()
    {
        //  filling  list with  Company objects
        // ........ //
        return new List<Company>();
    }
}


And I have form with ComboBox ( _uiCompany ):

_uiCompany.DisplayMember = "CompanyName";
_uiCompany.ValueMember = "CompanyID";
_uiCompany.DataSource = Firma.GetCompanyList();

GsmNumber oNumber = new GsmNumber();
oNumber.CompanyID = 3;

_uiCompany.DataBindings.Add("SelectedValue", oNumber, "CompanyID");


So I have ComboBox with ArrayList datasource and binded SelectedValue property. It works good (in combobox selected item is Company object with CompanyID = 3), but when i change item in combobox oNumber.CompanyID not changing! Why?

P.S. Sorry for ma English Frown | :(
AnswerRe: ComboBox & DataBindings Problem Pin
yarns15-Mar-07 19:04
yarns15-Mar-07 19:04 
Questionmy problem Pin
groundzero11115-Mar-07 7:53
groundzero11115-Mar-07 7:53 
AnswerRe: my problem Pin
Dave Kreskowiak15-Mar-07 13:19
mveDave Kreskowiak15-Mar-07 13:19 
QuestionContext menu glitch Pin
Anthony Mushrow15-Mar-07 7:29
professionalAnthony Mushrow15-Mar-07 7:29 
QuestionDataGridView Pin
aranhamarvel15-Mar-07 7:27
aranhamarvel15-Mar-07 7:27 
Questioninsert icon in the taskbar at runtime Pin
iman_kh15-Mar-07 7:24
iman_kh15-Mar-07 7:24 
AnswerRe: insert icon in the taskbar at runtime Pin
Stefan Troschuetz15-Mar-07 9:03
Stefan Troschuetz15-Mar-07 9:03 
QuestionAccept changes in db Pin
iman_kh15-Mar-07 7:17
iman_kh15-Mar-07 7:17 
QuestionPictureBox VS ? Pin
aei_totten15-Mar-07 7:02
aei_totten15-Mar-07 7:02 
AnswerRe: PictureBox VS ? Pin
aei_totten15-Mar-07 10:43
aei_totten15-Mar-07 10:43 
QuestionC# Container like the VB Collection??? Pin
code-frog15-Mar-07 6:34
professionalcode-frog15-Mar-07 6:34 
AnswerRe: C# Container like the VB Collection??? Pin
Colin Angus Mackay15-Mar-07 6:44
Colin Angus Mackay15-Mar-07 6:44 
GeneralRe: C# Container like the VB Collection??? Pin
code-frog15-Mar-07 11:11
professionalcode-frog15-Mar-07 11:11 
AnswerRe: C# Container like the VB Collection??? Pin
mav.northwind15-Mar-07 9:33
mav.northwind15-Mar-07 9:33 
GeneralRe: C# Container like the VB Collection??? Pin
code-frog15-Mar-07 11:12
professionalcode-frog15-Mar-07 11:12 
AnswerA hash table? Pin
Ennis Ray Lynch, Jr.15-Mar-07 10:02
Ennis Ray Lynch, Jr.15-Mar-07 10:02 
GeneralRe: A hash table? Pin
code-frog15-Mar-07 11:13
professionalcode-frog15-Mar-07 11:13 

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.