Rank: Member Groups: Member
Joined: 7/7/2010 Posts: 28
|
Hi,
I am populating the Menu with data table as per below
table.Columns.Add("Country", GetType(String)) table.Columns.Add("State", GetType(String)) table.Columns.Add("WebSite", GetType(String)) table.Columns.Add("TWindow", GetType(String)) table.Rows.Add(New Object() {"Test", "", "http://yahoo.com", "_blank"}) table.Rows.Add(New Object() {"Test1", "Test2", "http://msn.com", "_blank"})
Menu1.DataSource = mainTable Menu1.DataFields = "Country|State" Dim binding As New EO.Web.DataBinding() binding.DataField = "WebSite" binding.Property = "NavigateUrl" Menu1.Bindings.Add(binding) binding = New EO.Web.DataBinding() binding.DataField = "TWindow" binding.Property = "TargetWindow" Menu1.Bindings.Add(binding) Menu1.DataBind()
Menu display as
Test->'' Test1->'Test2'
How to remove the blank sub items.
I want to create the menu dynamically from sql table.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You need to change your "" to null when you add the data row.
Thanks!
|
Rank: Member Groups: Member
Joined: 7/7/2010 Posts: 28
|
Hi,
Thanks i have applied same and it is working ok.
Mehul
|