Click here to Skip to main content
15,885,673 members
Home / Discussions / C#
   

C#

 
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 
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 
OK, a few things. First, you haven't solved the problem of multiple forms. You've just hidden them and never reusing the them. You're creating a new instance of every form on every button click, even your MAIN FORM!!

You're using the default names for all of your controls. DON'T! I have no idea what "button1" does and, in a years time, neither will you. Always give your controls and variables meaningful names.

If these two button controls on your main form with the grids and just there to get data from the user to add to the grid, you should create an instance of the data entry form and show it with ShowDialog. When the user clicks OK on that form control will return to the line right after the ShowDialog call. You can then get the data from that form, put it in your grids, then Dispose the form.

Next, when you go and clear all the rows from your datagrids, you don't need loops to delete each row from the girds. Look at the documentation for the Rows collection. There's a Clear() method on it. Call that and you wipe out every row in your datagrid in a single line of code.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

GeneralRe: DataGridView Entry Disappears (C#) Pin
Member 114858881-Mar-15 11:32
Member 114858881-Mar-15 11:32 
GeneralRe: DataGridView Entry Disappears (C#) Pin
Dave Kreskowiak1-Mar-15 12:43
mveDave Kreskowiak1-Mar-15 12:43 
GeneralRe: DataGridView Entry Disappears (C#) Pin
Member 114858881-Mar-15 13:45
Member 114858881-Mar-15 13:45 
GeneralRe: DataGridView Entry Disappears (C#) Pin
Dave Kreskowiak1-Mar-15 15:29
mveDave Kreskowiak1-Mar-15 15:29 
QuestionHow can I pass a Lync url from C sharp to Lync and launch the meeting? Pin
turbosupramk327-Feb-15 6:27
turbosupramk327-Feb-15 6:27 
AnswerRe: How can I pass a Lync url from C sharp to Lync and launch the meeting? Pin
Eddy Vluggen1-Mar-15 22:48
professionalEddy Vluggen1-Mar-15 22:48 
GeneralRe: How can I pass a Lync url from C sharp to Lync and launch the meeting? Pin
turbosupramk32-Mar-15 6:32
turbosupramk32-Mar-15 6:32 
GeneralRe: How can I pass a Lync url from C sharp to Lync and launch the meeting? Pin
Eddy Vluggen2-Mar-15 7:54
professionalEddy Vluggen2-Mar-15 7:54 
QuestionAudio Finger Print For Advertisements Provider (For Discussion) Pin
Max Bayne27-Feb-15 0:29
Max Bayne27-Feb-15 0:29 
AnswerRe: Audio Finger Print For Advertisements Provider (For Discussion) Pin
Pete O'Hanlon27-Feb-15 2:47
mvePete O'Hanlon27-Feb-15 2:47 
GeneralRe: Audio Finger Print For Advertisements Provider (For Discussion) Pin
Max Bayne27-Feb-15 21:35
Max Bayne27-Feb-15 21:35 
QuestionParse Stream by Pattern Pin
gpc4426-Feb-15 23:37
gpc4426-Feb-15 23:37 
AnswerRe: Parse Stream by Pattern Pin
OriginalGriff27-Feb-15 0:12
mveOriginalGriff27-Feb-15 0:12 
GeneralRe: Parse Stream by Pattern Pin
gpc4427-Feb-15 0:57
gpc4427-Feb-15 0:57 
GeneralRe: Parse Stream by Pattern Pin
OriginalGriff27-Feb-15 2:43
mveOriginalGriff27-Feb-15 2:43 
JokeRe: Parse Stream by Pattern Pin
Richard MacCutchan27-Feb-15 2:52
mveRichard MacCutchan27-Feb-15 2:52 
GeneralRe: Parse Stream by Pattern Pin
OriginalGriff27-Feb-15 4:20
mveOriginalGriff27-Feb-15 4:20 

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.