Click here to Skip to main content
15,900,907 members
Home / Discussions / C#
   

C#

 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
Jibrohni21-May-10 0:29
Jibrohni21-May-10 0:29 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
Jibrohni21-May-10 0:47
Jibrohni21-May-10 0:47 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
OriginalGriff21-May-10 1:09
mveOriginalGriff21-May-10 1:09 
GeneralRe: Duplicate form with every instantiation of a class?? Pin
Luc Pattyn21-May-10 2:42
sitebuilderLuc Pattyn21-May-10 2:42 
AnswerRe: Duplicate form with every instantiation of a class?? Pin
PIEBALDconsult21-May-10 4:28
mvePIEBALDconsult21-May-10 4:28 
QuestionSelectedValue and comboboxen Pin
redspiderke20-May-10 21:44
redspiderke20-May-10 21:44 
AnswerRe: SelectedValue and comboboxen Pin
V.20-May-10 23:10
professionalV.20-May-10 23:10 
GeneralSOVELD: SelectedValue and comboboxen Pin
redspiderke21-May-10 3:59
redspiderke21-May-10 3:59 
When I do:

textBox1.text = txtBrand.SelectedValue.ToString()

the textbox shows the value "3".
An integer I think Smile | :)

But when I convert the textbox to an variable the debugger complains.

Kan een object van het type System.Int32 niet converteren naar het type System.Data.DataRowView.

After a long search i fixt it like this:

private void txtBrand_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (txtBrand.SelectedValue is DataRowView)
            {
                string BrandID = Convert.ToInt32(((DataRowView)txtBrand.SelectedValue)["Brand_Id"]).ToString();
                int ID = Convert.ToInt32(BrandID);
                GetVtgMerkTypes(ID);
            }
            else
            {
                int ID = Convert.ToInt32(txtBrand.SelectedValue.ToString());
                GetVtgMerkTypes(ID);
            }
        }


... this works Smile | :)
AnswerRe: SelectedValue and comboboxen Pin
Luc Pattyn21-May-10 2:48
sitebuilderLuc Pattyn21-May-10 2:48 
GeneralOPGELOST: SelectedValue and comboboxen Pin
redspiderke21-May-10 4:01
redspiderke21-May-10 4:01 
QuestionMessage Removed Pin
20-May-10 20:43
tanzeel8520-May-10 20:43 
AnswerRe: wmp..urgent Pin
J4amieC20-May-10 21:04
J4amieC20-May-10 21:04 
GeneralRe: wmp..urgent Pin
Luc Pattyn21-May-10 2:50
sitebuilderLuc Pattyn21-May-10 2:50 
QuestionHow to use wpf Pin
amit_8320-May-10 19:56
professionalamit_8320-May-10 19:56 
AnswerRe: How to use wpf Pin
Abhinav S20-May-10 20:57
Abhinav S20-May-10 20:57 
QuestionC# and Excel Pin
prithaa20-May-10 17:57
prithaa20-May-10 17:57 
AnswerRe: C# and Excel Pin
Garth J Lancaster20-May-10 18:26
professionalGarth J Lancaster20-May-10 18:26 
AnswerRe: C# and Excel Pin
RCoate20-May-10 19:20
RCoate20-May-10 19:20 
AnswerRe: C# and Excel Pin
Abhinav S20-May-10 20:53
Abhinav S20-May-10 20:53 
AnswerRe: C# and Excel Pin
Anas Abbas20-May-10 23:53
Anas Abbas20-May-10 23:53 
QuestionHow Do I Handle A Textbox Change Correctly? Pin
Roger Wright20-May-10 16:23
professionalRoger Wright20-May-10 16:23 
AnswerRe: How Do I Handle A Textbox Change Correctly? Pin
Dr.Walt Fair, PE20-May-10 16:57
professionalDr.Walt Fair, PE20-May-10 16:57 
AnswerRe: How Do I Handle A Textbox Change Correctly? Pin
Luc Pattyn20-May-10 17:25
sitebuilderLuc Pattyn20-May-10 17:25 
GeneralRe: How Do I Handle A Textbox Change Correctly? Pin
Roger Wright20-May-10 17:52
professionalRoger Wright20-May-10 17:52 
GeneralRe: How Do I Handle A Textbox Change Correctly? Pin
Luc Pattyn20-May-10 17:56
sitebuilderLuc Pattyn20-May-10 17:56 

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.