Welcome Guest Search | Active Topics | Sign In | Register

populate Menu with SQL Data using VS2005 Options
ROI.Solutions
Posted: Tuesday, April 22, 2008 12:25:22 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
Hi,

Im using the Free download to test the sftware and see if this is somehitng my company wants to purchase but i cant get anything to work here. From what i have read it should be easy. Heres what i have done, and remember im new to VS2005.

I created a Web prject using VB.

I have added a SQLDatasource to the web form and ran throught the wizard provided by VS2005 and gets the data fine. However Whe i drop either a menu or grid form your guys software and set the DataSource to the default "SqlDataSource1" connection nothing Happens.. Please help What i want to do is access my SQL Server with a stored procedure and then populate the menu from there.
eo_support
Posted: Tuesday, April 22, 2008 12:36:50 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
Hi Loren,

It won't be as easy as that. :) A few extra steps need to be taken before you can get anything to show up either in the menu or the grid.

The menu takes hierarchical data (because it has to figure out which item is the parent item, which one is the child item, etc), not tabular data, which is what a database offer by default. So in order to have anything to show up, you need to provide the menu additional information about the hierarchical structure of your tabular data. The menu supports many ways to do that. You can find detailed information on how to find that information from the help file. You can open the help file by going to Program Files -> EO.Web Controls 2007.2 -> EO.Web Controls for ASP.NET 2.0+ -> Documentation. Once you are there, go to EO.Web Menu -> Using EO.Web Menu -> Data Binding. Several samples are also included to demonstrate various ways to populate the menu. You can load the sample project by going to Program Files -> EO.Web Controls 2007.2 -> EO.Web Controls for ASP.NET 2.0+ -> Live Demo -> Live Demo Source Code.

A few more things also need to be taken care of before you can have any data to show up in your Grid. Again you can find the detailed information in the help file under EO.Web Grid -> Getting Started. A large number of Grid samples are also available in the sample project.

Please feel free to let us know if you have any more questions.

Thanks
ROI.Solutions
Posted: Tuesday, April 22, 2008 12:43:31 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
The Table i am pulling my menu Data from is idicatlly formated like the Live Demo. With A Prent Colum and a Sub Colum. How do i make VS2005 using the SQLDataSource wizard populates and pulls the Data Fine. The Menu wont lod it So I set the menu DataTable to the default connection ting that VS2005 genrates called "SqlDatSource1" what else must be done to Populater the Data?
eo_support
Posted: Tuesday, April 22, 2008 1:03:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
Hi Loren,

Having a parent column and a child column in your table does not mean that the menu knows such ---- you must explicitly tell the menu which field is parent and which field is child. Setting the Menu’s DataField property might be the easiest for you:

http://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fDataBinding%2fpopulate_table.html

You need to give the Menu two pieces of information: The tabular data itself (through code or SqlDataSource as you are doing) and hierarchical relationship. The menu then takes these two pieces of information to try to figure out which record is the root, which record are below the root, etc. In short, the menu relies on the hierarchical relationship information provided by you to transform a table into a tree. It then displays the menu based on that tree. In your case you didn't provide hierarchical relationship information, so nothing is populated.

As mentioned in our previous post, there are several ways for you to provide this information. We generally do not recommend one way over another for our clients because all ways work, which one to use not only is related to the circumstance, but also is a preference thing. We refer you to the documentation because even if we were to reply you directly from here, we would be providing the same contents as what's already there, while the document gives you a broader picture about what's available.

It will be much easier for you to start from the samples because it’s already working. Spending a little bit time going over the samples along with the documentation will definitely be worth it.

Thanks
ROI.Solutions
Posted: Tuesday, April 22, 2008 1:18:57 PM
Rank: Advanced Member
Groups: Member

Joined: 4/22/2008
Posts: 75
Yes i have looked at the examples several times but the examples tthey build the Data table from scartch and in the code which is not what im am doing.

The SqlDataSource Object works fine and pulls the Data. I have essentially 3 Columns needing to be pulled

Main Colum: Group_Short_Name
Sub Menu: Process_Short_Name
URL: Url

I have set the menu Data socre to the SqlDataSource1 object i have set the DataFields to "Group_Short_Name|Process_Short_Name"

and even added to the code what the help files has"

<eo:Menu Runat="server" DataFields="Country|State|City" tag="yes">/STRONG</segment>>
<topgroup>
<Bindings>
<eo:DataBinding
Property="NavigateUrl"
DataField="WebSite"
Depth="2">
</eo:DataBinding>
</Bindings>
</topgroup>
</eo:Menu>

And modified it accordingly... I need to make sure it works as intended before my VP will purchase the software today. Any help to show it does work will help me greatly.
eo_support
Posted: Tuesday, April 22, 2008 1:28:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
Hum...we will need to take a look of your code, then. We will set up an online meeting for you shortly and send you a private message with the meeting link. You can check your private message by clicking "Inbox" on the top of the forum, once you join the meeting, you can share your screen with us so that we can take a look.
eo_support
Posted: Tuesday, April 22, 2008 2:44:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,091
Hi,

In order to populate from SqlDataSource, you will need to add the following code in your Page_Load:

Code: C#
Menu1.DataSource = SqlDataSource.Select(DataSourceSelectArguments.Empty);
Menu1.DataBind();


Usually this is enclosed in "If !Page.IsPostBack" condition. Hopefully we can add such code into our future versions so that the menu can populate from a SqlDataSource property directly through DataSourceID property.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.