MVC Q1 2013 telerik controls Issue

2 posts, 0 answers
  1. Dayana Maliyakal
    Dayana Maliyakal avatar
    27 posts
    Member since:
    Jan 2010

    Posted 01 Nov 2013 Link to this post

    Hi,

       I am new in asp.net mvc.

    (I)

    View

    <%

     

    = Html.Telerik().ComboBoxFor(Model => Model.GetRequestedBy())

     

    .AutoFill(

     

    true)

     

    .BindTo(ViewData[

     

    "RequestedBy"] as SelectList)

     

     

    .HighlightFirstMatch(

     

    true)

     

    %>

    Model


     

     

    public DataTable GetRequestedBy()

     

    {

     

     

    Tests mytst = new Tests ();

     

     

     

    DataTable dtRequested = mytst .GetRequested(true);

     

     

     

    return dtRequested;

     

    }


    Controller

     

     

    public ActionResult Requested()

     

    {

     

     

    TestProject myTestProject  = new TestProject ();

     

    ViewData[

     

    "RequestedBy"] = myTestProject .GetRequestedBy();

     

     

     

    return View();

     

    }


    When I executing the above code I got an error  as below:

    "value" cannot be null or empty.

    (II)

    View

     

     

     

     

     

    <script src="../../Scripts/telerik.datetimepicker.min.js" type="text/javascript"></script>

     

     

     

     

     

    <%

     

    = Html.Telerik().DateTimePicker()

     

    .Name(

     

    "StartDate")

     

    .Value(

     

    DateTime.Now)

     

    %>

     

     

    When I executing the above code I got an error  as below:

    Microsoft JScript runtime error: 'undefined' is null or not an object


        I am using ASP.NET MVC Q1 2013 telerik controls(In asp.net mvc2 application).How to pass value from view to controller?(In textbox,combobox,datepicker etc).
       Can I get any sample project for the same?



    With regards
    Dayana

    When I executing the above code I got an error  as below:    I am using ASP.NET MVC Q1 2013 telerik controls(In asp.net mvc2 application).How to pass value from view to controller?(In textbox,combobox,datepicker etc).   Can I get any sample project for the same?With regardsDayana
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 05 Nov 2013 Link to this post

    Hi Dayana,

    The product that you are using - Telerik MVC Extensions was deprecated a while ago and is not longer in active support. If you still want to use Telerik controls for MVC, please check the Kendo UI product that offers a rich tool set of MVC widgets:

    http://www.kendoui.com/
     
    Regards,
    Kiril Nikolov
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top