Click here to Skip to main content
15,906,567 members
Home / Discussions / C#
   

C#

 
QuestionStreamReader in TcpListener Pin
Member 114922552-Mar-15 7:14
Member 114922552-Mar-15 7:14 
AnswerRe: StreamReader in TcpListener Pin
Paulo Zemek2-Mar-15 7:45
Paulo Zemek2-Mar-15 7:45 
GeneralRe: StreamReader in TcpListener Pin
Member 114922552-Mar-15 8:25
Member 114922552-Mar-15 8:25 
QuestionDatagridview row replay Pin
sdfsdfsdfewrew3feff1-Mar-15 5:03
sdfsdfsdfewrew3feff1-Mar-15 5:03 
GeneralRe: Datagridview row replay Pin
Richard MacCutchan1-Mar-15 6:15
mveRichard MacCutchan1-Mar-15 6:15 
GeneralRe: Datagridview row replay Pin
sdfsdfsdfewrew3feff1-Mar-15 8:23
sdfsdfsdfewrew3feff1-Mar-15 8:23 
GeneralRe: Datagridview row replay Pin
Richard MacCutchan1-Mar-15 22:38
mveRichard MacCutchan1-Mar-15 22:38 
GeneralRe: Datagridview row replay Pin
Eddy Vluggen2-Mar-15 8:02
professionalEddy Vluggen2-Mar-15 8:02 
Questioncreating a generic factory class that handles ValueTypes ? Pin
BillWoodruff28-Feb-15 23:36
professionalBillWoodruff28-Feb-15 23:36 
AnswerRe: creating a generic factory class that handles ValueTypes ? Pin
OriginalGriff1-Mar-15 0:11
mveOriginalGriff1-Mar-15 0:11 
GeneralRe: creating a generic factory class that handles ValueTypes ? Pin
BillWoodruff1-Mar-15 1:23
professionalBillWoodruff1-Mar-15 1:23 
AnswerRe: creating a generic factory class that handles ValueTypes ? Pin
manchanx1-Mar-15 1:53
professionalmanchanx1-Mar-15 1:53 
GeneralRe: creating a generic factory class that handles ValueTypes ? Pin
BillWoodruff1-Mar-15 6:26
professionalBillWoodruff1-Mar-15 6:26 
AnswerRe: creating a generic factory class that handles ValueTypes ? Pin
Richard Deeming2-Mar-15 2:24
mveRichard Deeming2-Mar-15 2:24 
QuestionIs there a way to make "speakers" pickup 440hz? Pin
Member 1148826328-Feb-15 18:13
Member 1148826328-Feb-15 18:13 
AnswerRe: Is there a way to make "speakers" pickup 440hz? Pin
OriginalGriff28-Feb-15 20:05
mveOriginalGriff28-Feb-15 20:05 
AnswerRe: Is there a way to make "speakers" pickup 440hz? Pin
Frankie-C1-Mar-15 1:21
Frankie-C1-Mar-15 1:21 
AnswerRe: Is there a way to make "speakers" pickup 440hz? Pin
GrooverFromHolland1-Mar-15 1:25
GrooverFromHolland1-Mar-15 1:25 
QuestionIs there Any Way to Set the Namespace of a Web Service in Configuration instead of Code? Pin
jojoba2027-Feb-15 22:52
jojoba2027-Feb-15 22:52 
AnswerRe: Is there Any Way to Set the Namespace of a Web Service in Configuration instead of Code? Pin
Dave Kreskowiak28-Feb-15 4:08
mveDave Kreskowiak28-Feb-15 4:08 
AnswerRe: Is there Any Way to Set the Namespace of a Web Service in Configuration instead of Code? Pin
jojoba2028-Feb-15 22:35
jojoba2028-Feb-15 22:35 
QuestionDataGridView Entry Disappears (C#) Pin
Member 1148588827-Feb-15 8:53
Member 1148588827-Feb-15 8:53 
When I add an item to the datagridview (from another form), it shows up just fine. But when I try to add another item to the datagridview, only the new item appears, and the previous one gets thrown out, it appears.

Note that I'm using .Hide, and .Show, to move between two forms (add_form and main_form). I've tried using .ShowDialog to see if it would fix the problem, but instead I get multiple instances of the same window open after moving back and forth between forms.

How can I fix this problem?

Here is the code that adds to the DGV:
C#
private void add_Click(object sender, EventArgs e)
    {           
        //OBJECT REFERENCE TO DGV
        invmain invmainobject = new invmain();

        //SWITCH STATEMENT FOR DIRECTING USER-ENTERED INVENTORY DATA  
        //TO THE APPROPRIATE TABCONTROL TAB AND DGV<1:4>

        switch(combobox1.SelectedIndex)
        {
            case 0: //ELECTRICAL
                invmainobject.datagridview1.Rows.Add(itembox.Text, quantitybox.Text);
                break;
            case 1: //MECHANICAL
                invmainobject.datagridview2.Rows.Add(itembox.Text, quantitybox.Text);
                break;
            case 2: //CABLES
                invmainobject.datagridview3.Rows.Add(itembox.Text, quantitybox.Text);
                break;
            case 3: //MISC.
                invmainobject.datagridview4.Rows.Add(itembox.Text, quantitybox.Text);
                break;
            default:
                MessageBox.Show("Please select a category.\t\t");
                combobox1.Focus();
                return;
               }
                invmainobject.Show();
                this.Close();

AnswerRe: DataGridView Entry Disappears (C#) Pin
Dave Kreskowiak27-Feb-15 11:26
mveDave Kreskowiak27-Feb-15 11:26 
GeneralRe: DataGridView Entry Disappears (C#) Pin
Member 1148588827-Feb-15 12:08
Member 1148588827-Feb-15 12:08 
GeneralRe: DataGridView Entry Disappears (C#) Pin
Dave Kreskowiak27-Feb-15 13:16
mveDave Kreskowiak27-Feb-15 13:16 

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.