Telerik Forums
UI for ASP.NET MVC Forum
5 answers
416 views
New to Kendo UI as well as MVC/Entity Framework, so please pardon me if this is a silly question.
I've spent the last 3 days trying to populate a DropDownList from a table within a SQL database.  Doing a basic BindTo(Model), I was getting a JSON circular reference error.  I eventually found the AJAX binding help page (http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/dropdownlist/overview#configure-the-kendo-dropdownlist-for-ajax-binding) and tried giving that a shot.
I modified it a bit to create a new Json result to contain only the table colums I need and eliminate the circular reference.  My application now builds and runs through, but I either get an empty dropdownlist or a spinning/loading image within the dropdownlist.  I put a break in the code, and I can see the 'results' array contains the correct information from the database table.  What am I doing wrong?

Controller:
namespace KendoUIMvcApplication1.Controllers
{
    public class HomeController : Controller
    {
        pinnwebEntities2 _db = new pinnwebEntities2();

        public ActionResult Index()
        {
            
            ViewBag.Message = "Welcome to ASP.NET MVC!";
            return View();
        }
        public JsonResult GetOUs()
        {
            var results = Json(from obj in _db.OUs select new { OU1 = obj.OU1, OU_description = obj.OU_description });
            
            return Json(results, JsonRequestBehavior.AllowGet);
        }

Index.cshtml:
@{
    ViewBag.Title = "Home Page";
}

@(Html.Kendo().DropDownList()
           .Name("clients")
           .DataTextField("OU_description")
           .DataValueField("OU1")
           .DataSource(source =>
            {
                source.Read(read =>
                    {
                        read.Action("GetOUs", "Home"); //Set the Action and Controller name
                    });
            })
           .SelectedIndex(0)
          )
Dimiter Madjarov
Telerik team
 answered on 07 Feb 2014
1 answer
141 views
Hello,

I'm trying to get the baseunitstep to only be used while showing days, and or if the days exceed more then 100 or if you get to many charts to fit, is this possible with the razor extension?

Thanks in advance
Iliana Dyankova
Telerik team
 answered on 07 Feb 2014
5 answers
113 views
I am wanting to replace MVCContrib grid with the Telerik grid in our projects.  With the Telerik grid can we define columns as a class like in MVCContrib e.g. Html.Grid(listOfData).WithModel(new ItemGridDef()) ?  

This allows us to reuse the grid in our project.
Alexander Popov
Telerik team
 answered on 07 Feb 2014
1 answer
201 views
Hi,

I want to bind the object list (object contain the two properties called Name and ID) and when i select Menu Item I want to get post request which is contain the selected object Name and ID. Is there anyway to do this with MVC menu control?

Thanks,
Erandika.
Petur Subev
Telerik team
 answered on 07 Feb 2014
2 answers
350 views
I'd like to provide a dropdown list of names to be used as part of the path to store files using the upload widget. Specifically, I'm using usernames as the directory name to store files. I have already figured out how to achieve this when the user is the one uploading files, however when an administrator does it then I need for them to be able to select the directory to upload the files to.
Matthew R.
Top achievements
Rank 1
 answered on 05 Feb 2014
4 answers
2.4K+ views
Hi, I'm new to mvc and even newer to Telrik's mvc controls but I'm having a hard time doing something that seems like it should take a couple of seconds. I just want to specify an alternate row color in my grid but I'm not having any luck doing it. I took a look at this demo but honestly I'm nto seeing where the alternate row color or (preferably) the theme is getting set? http://demos.telerik.com/kendo-ui/web/grid/index.html

Here's my mindlessly simple grid, if anyone can suggest what I need to do or where I can find good examples for simple tasks like this it would be greatly appreciated. Trying to convince my boss that MVC is he way to go but so far I'm kind of dumbfounded as to how complicated the ui seems to have gotten. 

Thanks
Bill

<div id="movies">
    @(Html.Telerik().Grid(Model)
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(model => model.Title).Width(500);
            columns.Bound(model => model.Price).Width(200);
        })
            .HtmlAttributes(new { style = "height: 380px;" })
            .Scrollable()
            .Groupable()
            .Sortable()
            .Scrollable ()
             
             
    )
</div>
 
<style scoped>
    #movies {
        width: 692px;
        height: 413px;
        margin: 30px auto;
        padding: 51px 4px 0 4px;
    }
    </style>

wdudek
Top achievements
Rank 1
 answered on 04 Feb 2014
1 answer
134 views
Hello i Am Mohit..

i am new to telerik controls, am using it into my application.
My issue is i have editor and above that one dropdown list and one button besides that, Now in jquery on the button click i want to put data into editor which is selected in drop down. For that i use simply i used:

$("#pass").click(function (event) {

 editor.value('dropdown selected Value');
}

its working fine in firefox and google chrome browsers, but not working in Internet Explorer it shows "Object Doesn't Support this Property or Method."

Can anyone please help me into this??
Dimo
Telerik team
 answered on 04 Feb 2014
1 answer
305 views
Hi,

How I can insert a blank row in a DropDownList

controller :

ViewBag.NoSource = new SelectList(db.Sources, "NoSource", "CodeSource");


View :

@(Html.Kendo().DropDownList()
    .Name("NoRisque") // Name of the widget should be the same as the name of the property
    .DataValueField("Value") // The value of the dropdown is taken from the EmployeeID property
    .DataTextField("Text") // The text of the items is taken from the EmployeeName property                                                       
    .BindTo((SelectList)ViewBag.NoSource) // A list of all employees which is populated in the controller                                                 
)

Dimo
Telerik team
 answered on 04 Feb 2014
1 answer
517 views
Kendo UI v 2013.3.1316
jQuery v1.9.1
All supported browsers of stated Kendo version

I'm looking for assistance (code snippet) to allow for full screen edit mode for the Kendo UI Editor similar to the Telerik ASP.Net AJAX Editor (http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx). Unfortunately this feature has already been turned down as a new feature (http://feedback.kendoui.com/forums/127393-kendo-ui-feedback/suggestions/2923765-editor) so I'm hoping someone else has already tackled this and has a solution.

Thanks,

Eric
Dimo
Telerik team
 answered on 04 Feb 2014
1 answer
157 views
How can we use a RADTextBox in an MVC 5 Razor page?
We wish to make use of this for taking advantage of 'Password Strength' option.
We are new to Telerik, so we are not sure how to use it correctly.
We don't see any reference to a text box in Telerik.Web.MVC.UI and entirely not sure how to get to RADInput via Telerik.Web.UI in the .cshtml.
Vasil
Telerik team
 answered on 04 Feb 2014
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
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
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?