Telerik Forums
UI for ASP.NET MVC Forum
1 answer
107 views
Hi there,

I am just transforming my pure ASP.net Application into an angular SPA.

The kendo widgets are defined with MVC wrappers and I use small javascripts i.e for 
--> .Events(e => e.DataBound("onDataBound")) or 
--> .Read(read => read.Action("Index", "Contact").Data("updateGrid")

However the scripts do not work when angular loads the partial. (updateGrid is not defined)

What is the best approach to reference a javascript from within a mvc defined Grid? Can I hand in an angular controller method somehow?


Thank you very much!
Alexander Valchev
Telerik team
 answered on 07 Jan 2015
1 answer
184 views
I have a form using various Kendo widgets (i.e. TextBoxFor, AutocompleteFor, etc) to capture data for my process.  When I submit the form and try to load view with an empty version of my viewmodel, much of the content in the view is from my previous screen when I use both TextBoxFor and AutoCompleteFor.  However, if I switch these to MaskedTextBoxFor everything seems to work fine.  

For example, I have an Address view capturing an address with John Doe 123 Main, NYC, NY and click submit to send it to my controller.  In my controller I create a new Address object and pass it back to the Address View.  When the View loads and I am using TextBoxFor or AutoCompleteFor, the contents to the boxes is still John Doe 123 Main, NYC, NY.  However if I change any of the fields to MaskedTextBoxFor, the correct data is displayed in the field.

Sorry if this is confusing, but I am not sure how to describe this so it makes the most sense.
Georgi Krustev
Telerik team
 answered on 07 Jan 2015
1 answer
125 views
I'm currently struggling with the MultiSelect inside a Grid Editor Template in that the posted model has too many strings.

This is from my editor template...

@(Html.Kendo().MultiSelectFor(model => model.messages)
      .Name("key_messages") // With or without makes no difference
      .Placeholder("Select Key Messages")
      .BindTo((System.String[])ViewData["key_messages"]))

My string array, "key_messages" is defined in my controller

string[] key_messages = { "work ethic", "efficiency", "fiscal" };
ViewData["messages"] = key_messages;

In my model

public string[] key_messages { get; set; } //I've also tried using List<string> with same results

Using fiddler, I can see that the posted data contains way too many objects.  For example, if I select "work ethic" and "efficiency", I get the following.

key_messages[0]
key_messages[1] work ethic
key_messages[2] work ethic
key_messages[3] efficiency

To make matters worse, if I save this, then attempt to remove one of the "work ethics", I get this (even though only two selections remain)...

key_messages[0]
key_messages[1] work ethic
key_messages[2] work ethic
key_messages[3] efficiency
key_messages[4] work ethic
key_messages[5] efficiency

I'm assuming that this is some type of serialization problems but I've not been able to put my finger on the problem.  

Please help.

Georgi Krustev
Telerik team
 answered on 06 Jan 2015
1 answer
552 views
This is my code i use this code to add control in telerik control but its showing a error.


@(Html.Kendo().Window()
    .Name("window")
    .Draggable()
    .Title("Window Popup")
    .Width(600)
    .Height(200)
    .Visible(false)
    .Content(@<text>
        @Html.Label("Select Image")
        @Html.Kendo().Upload();
        </text>)
)
Dimo
Telerik team
 answered on 05 Jan 2015
3 answers
112 views
hello
in the Help Document for the Grid

http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-client-api-and-events.html#insertRow


the insertRow function is described


insertRow object example

var grid = $("#Grid").data("tGrid");
var product = { ProductName: "KeyBoard", UnitPrice: 53.20};
grid.insertRow(product);



But in the current version of Kendo Ui MVC there is no function
insertRow()


Why? Is there an replacement?


Regards and best wishes for the new year
Atanas Korchev
Telerik team
 answered on 05 Jan 2015
1 answer
99 views
I'm trying to extend telerik kendo grid with some custom functionality (buttons). It relies on row selection. Is it possible to subscribe to selection change event for all grids on page, including those which are not rendered yet? It should work in analogy to the on() jquery method.

What I want to achieve is basically enabling/disabling some grid buttons in toolbar based on whether a row is selected or not. So maybe I'm going into wrong direction from the start and it can be done easier?
Georgi Krustev
Telerik team
 answered on 05 Jan 2015
3 answers
260 views
hi, these are  my codes for infinite scrolling but its not working .
i posted the code please check and i also debug the code but my action also  not running ..

i provided the code below please check...



@(Html.Kendo().MobileView()
       .Title("Scroll down to load")       
       .Content(obj =>          
            Html.Kendo().MobileListView<TelerikMvcApp5.ShoppingModel.PRODUCT_IMAGE>()
                .Name("endless-scrolling")
                .TemplateId("template")
                .EndlessScroll(true)                    
                .ScrollTreshold(30)
                .DataSource(dataSource =>
                    dataSource
                        .Read("Scroll", "Image")
                        .PageSize(20)                            
                )
        )   
)

<script type="text/x-kendo-tmpl" id="template">
    <div class="product">
        <img src="#=IMAGENAME#" alt="image" class="pullImage"/>
   
    </div>
</script>

<style scoped>
    .product h3 {
        font-size: 1.3em;
        font-weight: normal;
        line-height: 1.4em;
        margin: 0;
        padding: .5em 0 0;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .product p {
        font-size: 1em;
        margin: 0;
        padding: .3em 0 0;
    }
    .pullImage {
        width: 64px;
        height: 64px;
        border-radius: 3px;
        float: left;
        margin-right: 1em;
    }
</style>


This is my action with controller

public class ImageController : Controller
    {
        ShoppingEntities db = new ShoppingEntities();
        //
        // GET: /Image/
        public ActionResult Index()
        {
            return View();
        }


[AcceptVerbs(HttpVerbs.Post)]

    public ActionResultScroll([DataSourceRequest] DataSourceRequest request)
        {

            var list = db.PRODUCT_IMAGE.ToList();
            return Json(list.ToDataSourceResult(request));

        }
    }
Petyo
Telerik team
 answered on 03 Jan 2015
0 answers
64 views
Hello,
         I want to add a control in telerik control so please give a proper solution. 
         This is my code

         @(Html.Kendo().Window()
    .Name("window")
    .Draggable()
    .Title("Window Popup")
    .Width(600)
    .Height(200)
    .Visible(false)
    .Content(@<text>
        @Html.Label("Select Image")
        @Html.Kendo().Upload();
        </text>)

I used this code to add control but its showing error message.
)
Shakil
Top achievements
Rank 1
 asked on 03 Jan 2015
3 answers
160 views
Hi,

We are planning to start a new project in ASP.Net MVC and are planning to use telerik controls for ASP.Net MVC. We were thinking about using some client side MV* framework for better organization of client side code. Can you please guide on:

1. Which client side framework/library is more compatible with telerik's ASP.Net MVC controls e.g. Knockout JS or Angular JS or ?
2. Telerik recommends using such frameworks with already existing client side API of controls or not? 

Any recommendations?

Thanks
Petyo
Telerik team
 answered on 02 Jan 2015
1 answer
336 views
Hi,

I'm trying to implement the persist state methods set/getOptions() for the new release. But when calling those methods I am getting the undefined error message. I've installed the new release and updated my kendo.all.min.js file within my scripts.

Anything that I am missing out? 

Thanks!
Dimo
Telerik team
 answered on 01 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?