This is a migrated thread and some comments may be shown as answers.

TreeView - ActionName and Controller Name

1 Answer 61 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jigar
Top achievements
Rank 1
Jigar asked on 23 Aug 2010, 09:50 AM
Hi List,

I have created tree view for self-referencing table.

Html.Telerik()
    .TreeView()
    .Name("menuctrl")
    .BindTo(Model, Sub(mappings)
                       mappings.For(Of Menu)(Sub(binding)
                                            binding.ItemDataBound(Sub(item, menu)
                                                      item.Text = menu.name
                                                   item.Value = menu.id.ToString()
                           End Sub).Children(Function(submenu) submenu.CTS_Menus)
                    End Sub)
                       mappings.For(Of Menu)(Sub(binding)
                                             binding.ItemDataBound(Sub(item, menu)
                                                      item.Text = menu.name
                                                      item.Value = menu.id
                                                    item.ControllerName = "Error"
                                                    item.ActionName = "Index"
                                                          End Sub)
                         End Sub)
              End Sub).Render()

But I am not able to navigate using this menu. When i click my controller action never get called.

Is it a know problem? or Please suggest how can i solve this problem.

thanks.

1 Answer, 1 is accepted

Sort by
0
quentinjs
Top achievements
Rank 1
answered on 01 Oct 2010, 08:20 AM
Try moving the lines
item.ControllerName = "Error"
item.ActionName = "Index"

to the first section.  That seemed to work for me.
Tags
TreeView
Asked by
Jigar
Top achievements
Rank 1
Answers by
quentinjs
Top achievements
Rank 1
Share this question
or