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

Build wrapper around the combobox.

0 Answers 15 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Naveen
Top achievements
Rank 1
Naveen asked on 15 Dec 2011, 04:39 AM
Hi,

I need to build a wrapper around the combo box. I will basically be encapsulating a combo box inside a helper method. I am unable to get the @Html.Telerik() class in the helper methods. The helper method will know what data to fill based on some other parameters.

I'm able to access the @Html.Telerik() in the view but not on the helper methods.

This is what I found from the documentation of how to "Using a helper to define templates". I want something similar. But When I say Html I don't see Telerik at all. All I get is a Html TextBox and Html TextArea.

@helper OrdersDetailViewTemplate(WebViewPage page, Order o)
{
    <text>
        @(Html.Telerik().Grid(o.Order_Details)
                .Name("OrderDetails_" + o.EmployeeID + "_" +  o.OrderID)
        )
    </text>
}
  
@( Html.Telerik().Grid(Model)
    .Name("Employees")
    .DetailView(detailView => detailView.Template(
        @<text>
            @(Html.Telerik().Grid(item.Orders)
                    .Name("Orders_" + item.EmployeeID)
                    .DetailView(ordersDetailView => ordersDetailView.Template(o => OrdersDetailViewTemplate(this, o)))
            )
        </text>
    ))
)

Thanks for any help

Naveen
Tags
ComboBox
Asked by
Naveen
Top achievements
Rank 1
Share this question
or