Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
AnswerRe: Calculate code complexity Pin
Alan Balkany31-May-13 4:56
Alan Balkany31-May-13 4:56 
GeneralRe: Calculate code complexity Pin
Eddy Vluggen31-May-13 6:25
professionalEddy Vluggen31-May-13 6:25 
GeneralRe: Calculate code complexity Pin
Alan Balkany31-May-13 9:33
Alan Balkany31-May-13 9:33 
GeneralRe: Calculate code complexity Pin
Eddy Vluggen31-May-13 11:01
professionalEddy Vluggen31-May-13 11:01 
QuestionProblem about menustrip in windows forms Pin
Arun kumar Gautam30-May-13 20:35
Arun kumar Gautam30-May-13 20:35 
AnswerRe: Problem about menustrip in windows forms Pin
Richard MacCutchan30-May-13 21:14
mveRichard MacCutchan30-May-13 21:14 
GeneralRe: Problem about menustrip in windows forms Pin
Arun kumar Gautam30-May-13 21:29
Arun kumar Gautam30-May-13 21:29 
GeneralRe: Problem about menustrip in windows forms Pin
Richard MacCutchan30-May-13 21:45
mveRichard MacCutchan30-May-13 21:45 
And what happens when you step through it in your debugger? Although, at a guess it is failing the if expression.

BTW please indent your code and put <pre> tags round it, so it looks like:
C#
public void SubMenu(ToolStripMenuItem menuitem, string submenu)
{
    string get_subcatagory = "select * from medicine_subcatagory where Cat_ID=(select Cat_ID from medicine_catagory where Med_Cat='" + allopathicToolStripMenuItem.Text + "')";
    DataTable dt = d.getdata(get_subcatagory);
    
    foreach (DataRow dr in dt.Rows)
    {
        ToolStripMenuItem ssmenu = new ToolStripMenuItem(dr["Med_Sub"].ToString(),null, new EventHandler(ChildClick));
        if (menuitem.DropDownItems.Contains(menuitem.DropDownItems[dr["Med_Sub"].ToString()]))
        {
            menuitem.DropDownItems.Remove(ssmenu);
        }
        else
        {
            menuitem.DropDownItems.Add(ssmenu);
        }
    }
}

Use the best guess

GeneralRe: Problem about menustrip in windows forms Pin
Arun kumar Gautam30-May-13 21:50
Arun kumar Gautam30-May-13 21:50 
GeneralRe: Problem about menustrip in windows forms Pin
Richard MacCutchan30-May-13 21:52
mveRichard MacCutchan30-May-13 21:52 
GeneralRe: Problem about menustrip in windows forms Pin
Arun kumar Gautam30-May-13 22:01
Arun kumar Gautam30-May-13 22:01 
GeneralRe: Problem about menustrip in windows forms Pin
Richard MacCutchan30-May-13 23:18
mveRichard MacCutchan30-May-13 23:18 
GeneralRe: Problem about menustrip in windows forms Pin
Arun kumar Gautam31-May-13 0:38
Arun kumar Gautam31-May-13 0:38 
QuestionEdit text file using C# Pin
srikanth kamuju29-May-13 22:21
professionalsrikanth kamuju29-May-13 22:21 
AnswerRe: Edit text file using C# Pin
Eddy Vluggen29-May-13 22:36
professionalEddy Vluggen29-May-13 22:36 
GeneralRe: Edit text file using C# Pin
srikanth kamuju29-May-13 23:24
professionalsrikanth kamuju29-May-13 23:24 
GeneralRe: Edit text file using C# Pin
Eddy Vluggen30-May-13 0:17
professionalEddy Vluggen30-May-13 0:17 
GeneralRe: Edit text file using C# Pin
srikanth kamuju30-May-13 1:29
professionalsrikanth kamuju30-May-13 1:29 
GeneralRe: Edit text file using C# Pin
Eddy Vluggen30-May-13 2:13
professionalEddy Vluggen30-May-13 2:13 
JokeRe: Edit text file using C# Pin
AlphaDeltaTheta30-May-13 3:04
AlphaDeltaTheta30-May-13 3:04 
QuestionRe: Edit text file using C# Pin
AlphaDeltaTheta29-May-13 23:12
AlphaDeltaTheta29-May-13 23:12 
AnswerRe: Edit text file using C# Pin
srikanth kamuju29-May-13 23:21
professionalsrikanth kamuju29-May-13 23:21 
AnswerRe: Edit text file using C# Pin
AlphaDeltaTheta29-May-13 23:37
AlphaDeltaTheta29-May-13 23:37 
GeneralRe: Edit text file using C# Pin
Richard MacCutchan29-May-13 23:43
mveRichard MacCutchan29-May-13 23:43 
GeneralRe: Edit text file using C# Pin
AlphaDeltaTheta30-May-13 0:01
AlphaDeltaTheta30-May-13 0:01 

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.