Click here to Skip to main content
15,897,519 members
Home / Discussions / C#
   

C#

 
AnswerRe: Datagrid doesn't show data Pin
ircnoob8-Aug-06 23:14
ircnoob8-Aug-06 23:14 
Questionusing separate codefiles Pin
Glen Harvy8-Aug-06 14:22
Glen Harvy8-Aug-06 14:22 
AnswerRe: using separate codefiles Pin
Leslie Sanford8-Aug-06 16:26
Leslie Sanford8-Aug-06 16:26 
GeneralRe: using separate codefiles Pin
Glen Harvy8-Aug-06 18:39
Glen Harvy8-Aug-06 18:39 
GeneralRe: using separate codefiles Pin
Leslie Sanford8-Aug-06 19:05
Leslie Sanford8-Aug-06 19:05 
GeneralRe: using separate codefiles Pin
Glen Harvy8-Aug-06 21:21
Glen Harvy8-Aug-06 21:21 
AnswerRe: using separate codefiles Pin
Nader Elshehabi8-Aug-06 18:45
Nader Elshehabi8-Aug-06 18:45 
QuestionerrorProvider problem [modified] Pin
dustin108-Aug-06 13:25
dustin108-Aug-06 13:25 
Hey guys,

I am writing a little two way chat program for fun and I am trying to get an error provider to validate the nickname text field. I have the nickname text field and login button set up within the same group box. Whenever the user clicks the "Logon" button I want to check to see if the nickname textbox is empty. If it is I want to set the error handler. Here is my code:
private void btnLogon_Validating(object sender, CancelEventArgs e)
{
    // check to see if the nickname is empty
    if (tboxNickname.Text == "")
    {
        mainErrorProvider.SetError(tboxNickname, "No nickname entered.");
        e.Cancel = true;

        // set the focus to the nickname textbox
        if (tboxNickname.CanFocus)
            tboxNickname.Focus();
    }
    else
    {
        // clear any error
        mainErrorProvider.SetError(tboxNickname, "");
    }
}

So my problem is this. When i click the button nothing happens, until i click something on the form that is outside of the group box containing the button and text field. Can anyone tell me what is going on? Thanks in advance.


-- modified at 19:26 Tuesday 8th August, 2006
AnswerRe: errorProvider problem Pin
stancrm8-Aug-06 22:14
stancrm8-Aug-06 22:14 
QuestionColor deviation algorithm... Pin
Shy Agam8-Aug-06 12:54
Shy Agam8-Aug-06 12:54 
QuestionExplorer bar type applications Pin
martin_hughes8-Aug-06 12:17
martin_hughes8-Aug-06 12:17 
QuestionCustom type casting Pin
Master Toothless One8-Aug-06 11:04
Master Toothless One8-Aug-06 11:04 
AnswerRe: Custom type casting Pin
led mike8-Aug-06 11:08
led mike8-Aug-06 11:08 
AnswerRe: Custom type casting [modified] Pin
Patricker8-Aug-06 12:00
Patricker8-Aug-06 12:00 
GeneralRe: Custom type casting Pin
Master Toothless One8-Aug-06 13:06
Master Toothless One8-Aug-06 13:06 
GeneralRe: Custom type casting Pin
Patricker8-Aug-06 13:44
Patricker8-Aug-06 13:44 
GeneralRe: Custom type casting [modified] Pin
Master Toothless One8-Aug-06 14:05
Master Toothless One8-Aug-06 14:05 
QuestionDatagrid column headers Pin
Naji.A8-Aug-06 9:51
Naji.A8-Aug-06 9:51 
AnswerRe: Datagrid column headers Pin
_AK_8-Aug-06 18:33
_AK_8-Aug-06 18:33 
GeneralRe: Datagrid column headers Pin
Naji.A9-Aug-06 16:26
Naji.A9-Aug-06 16:26 
Questionauto comboBox Pin
TAREQ F ABUZUHRI8-Aug-06 9:15
TAREQ F ABUZUHRI8-Aug-06 9:15 
AnswerRe: auto comboBox Pin
stancrm8-Aug-06 9:56
stancrm8-Aug-06 9:56 
Questionget files names from subdirectories Pin
Mridang Agarwalla8-Aug-06 7:57
Mridang Agarwalla8-Aug-06 7:57 
AnswerRe: get files names from subdirectories Pin
Stefan Troschuetz8-Aug-06 8:04
Stefan Troschuetz8-Aug-06 8:04 
AnswerRe: get files names from subdirectories Pin
Eric Dahlvang8-Aug-06 9:12
Eric Dahlvang8-Aug-06 9:12 

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.