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

[Solved] combo box inside panelbar

0 Answers 60 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 1
Sam asked on 03 Oct 2012, 10:11 PM
Hi,
I'm using MVC3 with Razor.  I have the following code:

 @(Html.Telerik().PanelBar()
                .Name("panelHeader")
                .Items(parent =>
                    {
                        parent.Add()
                            .Content(@<text>
                                <table width="90%">
                                    <tr>
                                        <td colspan="3">
                                            @(Html.Telerik().ComboBox()
                                                .Name("Cmbo")
                                                .DataBinding(binding => binding.Ajax().Select("Get", "Home"))
                                                .HtmlAttributes(new { style = "width:400px; white-space:nowrap;font-size: 10px;" })
                                                   .ClientEvents(events => events
                                                    .OnChange("Cmbo_onChange"))
                                            )


                                        </td>
                                    </tr>    
                                </table>
            
                                </text>).Expanded(true);
                    }
                ))

  <script type="text/javascript">
    function Cmbo_onChange(){
        //alert('hi');
    }
</script>

When I run the app, VS2010 gives me this error:
Microsoft JScript runtime error: 'Cmbo_onChange' is undefined

Can anyone help me how to solve this issue?  Thanks!
Tags
PanelBar
Asked by
Sam
Top achievements
Rank 1
Share this question
or