- SqlDataAdapter dadSubCat = new SqlDataAdapter();
-
dadSubCat.SelectCommand = new SqlCommand("SELECT ID,PID,Title FROM Page where userid='user1'", con);
-
DataSet dsCat = new DataSet();
-
dadSubCat.Fill(dsCat, "Page");
-
dsCat.Relations.Add("ParentChild", dsCat.Tables["Page"].Columns["ID"], dsCat.Tables["Page"].Columns["PID"], true);
-
int count = 0;
-
foreach (DataRow categoryRow in dsCat.Tables["Page"].Rows)
-
{
-
DataRow[] subCatRows = categoryRow.GetChildRows("ParentChild");
-
if (categoryRow.GetParentRows("ParentChild").Length == 0)
-
{
-
skmMenu.MenuItem mNode = new skmMenu.MenuItem("<img src=\"menublip.gif\" align=\"absmiddle\">" + categoryRow["Title"].ToString(), "");
-
-
foreach (DataRow row in subCatRows)
-
{
-
string Title = row["Title"].ToString();
-
mNode.SubItems.Add(new skmMenu.MenuItem(Title, ""));
-
-
-
}
-
-
Menu1.Items.Add(mNode);
-
}
-
-
}
-
i can put for one sub menu but in case of multiple sub menu,is there a possible easy way for that one? 5 3176
can any moderator help me out of this problem, instead of locking me from this post?
please help me for the above post.
tlhintoq 3,525
Recognized Expert Specialist
I think I would store store a value of the Parent name... then at creation time search through all the existing menu items until I find the parent name, then make the new item a child of that. That should let you keep going several layers deep, so long as you don't have repeats of menu entries. You couldn't have a "Save" under "Images" and a "Save" under "Documents" for example. If the stored parent name is null, then it must be a root level menu. If the stored value is not null, but doesn't exist in a given menu, then the stored name is the root level to make first.
tlhintoq 3,525
Recognized Expert Specialist
Yesterday, 01:02 AM - Original post
Today, 12:41 AM - bump (to be polite about it)
Today, 06:08 AM - bump
Dude... Relax and have some patience with the volunteers here. This isn't a site where you are paying people for tech support. Anyone with the background to give you help probably has a job and is not just sitting around the computer waiting for questions. Some experts check the site once a day, others throughout the day while at the office, but not from home, others only from home but can't during the work day. etc. At the moment I am doing an installation in a foreign country and am limited to when this 3rd world internet is working, and I'm not installing computers down in one of the caves (really, in caves.)
Instead of just waiting for someone to reply to your question... Maybe there are other areas of your program you could work on and come back to the menus later... or you could experiment with several different ways of doing the menus. Finding alternative perspectives and alternative approaches is vital do this line of work.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Raymond H. |
last post by:
Hello,
1- How to see, in a Label, the URL of a link that the mouse pass over?
(in the WebBrower control in a vb projet).
2- How to create a menu and a submenu via a button Command1? and...
|
by: badboybrown |
last post by:
Hello,
Is it possible to step through the "Create MDE" process and see what is
causing Access to crash?
I tried, unsuccessfully, many times to create an MDE from my database.
But, randomly, I...
|
by: tommie.nygren |
last post by:
I am using Visual Studio.NET 2003 Enterprise Architect Edition
(according to my IT guy... how do I actually check what version of it I
am using?) and SQL Server Developer Edition (8.00.194 for you...
|
by: Peter |
last post by:
Would someone provide a gentle explanation of how programs such as Adobe
Acrobat and Crystal Reports are able to add toolbars to the Access UI. (So
that when you start msaccess.exe these toolbars...
|
by: max |
last post by:
Hello,
I am a newbye, and I'm trying to write a simple application.
I have five tables with three columns; all tables are identical; I need to
change some data in the first table and let VB...
| |
by: MMcCarthy |
last post by:
These are the basic instructions on how to create an mde file.
Create a backup copy of your "filename.mdb" frontend
Go to Tools - Startup and set the startup form to the switchboard/menu form...
|
by: DeZZar |
last post by:
Hi all,
I need to regularly backup my database as an Excel file and have been
using the File Export option.
Problem is I need anyone using the database to be able to do this
easily - nopt...
|
by: Jay Douglas |
last post by:
Hi community,
I would like to add a new custom menu item to the right click context menu's
in notepad and the cmd shell. The same context menu that displays edit,
paste, etc. Example, someone...
|
by: raaja |
last post by:
How to create Horizontal dropdown menu, tat menu items coming from database.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |