Telerik Forums
UI for ASP.NET MVC Forum
0 answers
116 views
Dear Experts,

I am using the MVC2 WEB application .
I have downloaded dll from this site http://simple-telerik-extensions.googlecode.com/svn-history/r14/trunk/telerik/Binaries/Mvc2/

I am using the following code in my view
   <%
        Html.Telerik().ComboBox()
            .Name("MenuIDs")
            
        .Render();       

                 %>
i am getting following error please help me
 'Telerik.Web.Mvc.UI.ViewComponentFactory' does not contain a definition for
'ComboBox' and no extension method 'ComboBox' accepting a first argument of type
'Telerik.Web.Mvc.UI.ViewComponentFactory' could be found (are you missing a
using directive or an assembly reference?)



Hari
Top achievements
Rank 1
 asked on 06 Oct 2014
1 answer
469 views
I have a Grid that I want to use for adding information to a collection in the DataModel of my view.  How do I bind the Grid to my collection and then when it is passed back to the controller ensure that any CRUD changes made to grid are reflected in the DataModel?  Below is my Grid. 

01.@(Html.Kendo().Grid(Model.Charges)
02.      .Name("charges_grid")
03.      .Columns(columns =>
04.      {
05.          columns.Bound(charge => charge.Type)
06.              .Title("Charge Description");
07.          columns.Bound(charge => charge.Amount)
08.              .HtmlAttributes(new { @style = "text-align:right;" })
09.              .Width(100)
10.              .Title("Amount");
11.          columns.Command(command =>
12.          {
13.              command.Edit();
14.              command.Destroy();
15.          }).Width(175);
16.      })
17.      .BindTo(Model.Charges)
18.      .ToolBar(toolbar => toolbar.Create())
19.      .Editable(editable => editable.CreateAt(GridInsertRowPosition.Bottom))
20.      .DataSource(dataSource => dataSource
21.          .Ajax()
22.          .Model(model => model.Id(p => p.Type))
23.          .ServerOperation(false)
24.          .Create(update => update.Action("Create", "Home"))
25.          .Read(read => read.Action("Read", "Home"))
26.          .Update(update => update.Action("Update", "Home"))
27.          .Destroy(update => update.Action("Destroy", "Home"))
28.      ))

This is part of a larger view where I am capturing the data for my model, but I can not get my grid to populate with contents of my collection on load or my model to contain updated or new items upon return to the controller.  Below is a sample of my model.

01.public class Shipment
02.{
03.   // other data members
04.    public string Signed { get; set; }
05.    public string BundleId { get; set; }
06.    public float TotalAmountDue { get; set; }
07. 
08.    public ICollection<Charge> Charges { get; set; }
09.}

Petur Subev
Telerik team
 answered on 06 Oct 2014
1 answer
3.2K+ views
I have a Kendo Grid as in code below - I have a View column which calls a javascript function.
I want to add an action url to a custom data attribute i.e. data-actionurl on the column. In the javascript function I will then get the data attribute and redirect to that page.
Is this possible?


@(Html.Kendo().Grid<Mallons.DomainFire.Models.Houses>()
    .Name("gridFcRevised")
    .Columns(columns =>
    {
            columns.Command(command => command.Custom("View").Click("viewRevisedHouse")).Width("85px").HtmlAttributes( new {@data-actionurl=Url.Action('AjaxAdd', 'HouseFee', new {Oid = '#=Oid#'})});    //Error here
            columns.Command(command => command.Custom("View").Click("viewRevisedHouse")).Width("85px"); // This works fine
      columns.Bound(p => p.Oid).Visible(false);
      columns.Bound(p => p.ApplicationDate).Format("{0:dd/MMM/yyyy}").Title("Application Date");
      columns.Bound(p => p.RevisedHouseReason).Title("Revised Reason");
    })
    .Pageable()
    .Sortable()
    .Scrollable(s=>s.Height("auto"))
    .Filterable()   
    .DataSource(dataSource => dataSource
        .Ajax()
        .Events(e => e.Error("handleAjaxError"))
        .PageSize(10)
        .Read(read => read.Action("RevisedHouses_GridRead", "House", new {originalHouseOid= Model.Entity.Oid }))
     )
)





Petur Subev
Telerik team
 answered on 06 Oct 2014
1 answer
123 views
Hello,

I am receiving the error "Maximum call stack size exceeded" in the Chrome console while trying to bind SignalR data to the KendoUI Grid (v2014.2.903).  
After downgrading the latest version of jQuery 2.1.1 to 1.9.1, the Grid appears to be working well. Seems like it doesn't support the latest version of jQuery? 

Thanks!

Petur Subev
Telerik team
 answered on 06 Oct 2014
2 answers
159 views
Just want to make aware that I personally have had serious performance issues using firstly Telerik MVC Menu and now Kendo UI MVC Menu. It would usually take 2000-3000ms to render the menu. This occured over 3 seperate projects. I have since removed the menu and created a basic custom version to save 2000-3000ms loading times. These loading times were especially very noticable running on Windows Azure Web Role instances.
Marcel Härry
Top achievements
Rank 1
 answered on 03 Oct 2014
3 answers
567 views
Hi,

I want to respond to a click event on my tabs even if the user clicks on the one currently selected.

The "Select" event works fine when switching tabs but I need to do something if the user clicks on the currently selected tab.

Thanks,

Paul.
Dimiter Madjarov
Telerik team
 answered on 03 Oct 2014
2 answers
267 views
Hi,

I'm using nested grid. In child grid i'm using datepicker. followed as per the below reference link.

http://www.telerik.com/forums/nested-clienttemplate-not-working#OXkDhzlO9UCTmHNzIuvH2A

after that i'm having below issues:-
Values are not binding in the datepicker
script text is printing in grid datepicker cells
when i try to select the date then date selecting icon missing.

Please refer the attachment for the screenshot.

here is my code.

 columns.Bound(a => a.EffStartDate).Width(130).HtmlAttributes(new
                {
                    @class = "templateCell"

                }).ClientTemplate(
                Html.Kendo().DatePicker()
                .Name("FDPickerSD_\\#=AllocationID\\#")
                .Format("{0:dd/MM/yyyy}")
                .HtmlAttributes(new { data_bind = "value:EffStartDate" })
                .Deferred()
                .ToClientTemplate().ToHtmlString() +
                    "<div class=\"scripts\">" +
                        Html.Kendo().DeferredScripts(false).ToString().Replace("jQuery(\"\\#", "jQuery(\"\\\\\\#") +
                    "</div>"
                ).Format("{0:dd/MM/yyyy}");
*************************************************************************************************************************************
                columns.Bound(a => a.EffEndDate columns.Bound(a => a.EffStartDate).Width(130).HtmlAttributes(new
                {
                    @class = "templateCell"

                }).ClientTemplate(
                Html.Kendo().DatePicker()
                .Name("FDPickerSD_\\#=AllocationID\\#")
                .Format("{0:dd/MM/yyyy}")
                .HtmlAttributes(new { data_bind = "value:EffStartDate" })
                .Deferred()
                .ToClientTemplate().ToHtmlString() +
                    "<div class=\"scripts\">" +
                        Html.Kendo().DeferredScripts(false).ToString().Replace("jQuery(\"\\#", "jQuery(\"\\\\\\#") +
                    "</div>"
                ).Format("{0:dd/MM/yyyy}");

                columns.Bound(a => a.EffEndDate).Width(130).HtmlAttributes(new
                {
                    @class = "templateCell"

                }).ClientTemplate(
                Html.Kendo().DatePicker()
                .Name("FDPickerED_\\#=AllocationID\\#")
                .Format("{0:dd/MM/yyyy}")
                .HtmlAttributes(new { data_bind = "value:EffEndDate" })
                .Deferred()
                .ToClientTemplate().ToHtmlString() +
                    "<div class=\"scripts\">" +
                        Html.Kendo().DeferredScripts(false).ToString().Replace("jQuery(\"\\#", "jQuery(\"\\\\\\#") +
                    "</div>"
                );).Width(130).HtmlAttributes(new
                {
                    @class = "templateCell"

                }).ClientTemplate(
                Html.Kendo().DatePicker()
                .Name("FDPickerED_\\#=AllocationID\\#")
                .Format("{0:dd/MM/yyyy}")
                .HtmlAttributes(new { data_bind = "value:EffEndDate" })
                .Deferred()
                .ToClientTemplate().ToHtmlString() +
                    "<div class=\"scripts\">" +
                        Html.Kendo().DeferredScripts(false).ToString().Replace("jQuery(\"\\#", "jQuery(\"\\\\\\#") +
                    "</div>"
                );

Rosen
Telerik team
 answered on 02 Oct 2014
3 answers
268 views
Hi.

I'm having a small issue with a DropDownList using server filtering. I have added a DropDownList with server filtering, and it is working as it should. My issue is that I have some checkboxes that should influence the result of the filtering. The problem is that when I have clicked the DropDownList it caches the result the next time I click it, until I type some text for the text filter.

Here is how it now works.

1) As you can see in Fig1 of the attached files, the first time I click it, it returns 1260 results
2) I then check the CheckBox "Choice1" and then click the DropDownList again, it still shows 1260 results (is supposed to be 383) and the data read method in the controller is not even triggered.

Is there some way I can get the DropDownList not to cache the results on the click, so that each time it is clicked the data read method is called?

Here's from the cshtml file:

@(Html.Kendo().DropDownListFor(m => m.Lines[i].Product.Id)
                                                      .DataTextField("Value")
                                                      .DataValueField("Id")
                                                      .OptionLabel(" ")
                                                      .AutoBind(false)
                                                      .Text(Model.Lines[i].Product.Description)
                                                      .Filter("contains")
                                                      .DataSource(source =>
                                                      {
                                                          source.Read(read =>
                                                          {
                                                              read.Action("SearchProductLandingNote", "ReportSearchResultSurface");
                                                          })
                                                          .ServerFiltering(true);
                                                      }))

And here's from the backing controller:

        public JsonResult SearchProductLandingNote(string text)
        {
            SurofiUser sUser = UserUtilities.GetLoggedInUser();

            var products = RegisterUtilities.Instance.Products.Where(ca => ca.Description != null || ca.Code != null).ToList();

            //
            // Some code that filters from the checkboxes, the info from the checkboxes are stored on the User
            // Checked in debugging and works fine when the method is actually called
            //

            return Json(products, JsonRequestBehavior.AllowGet);
        }

Odd Veibust
Top achievements
Rank 1
 answered on 02 Oct 2014
2 answers
128 views
Symptom
the validation bubbles for my grid show up on the wrong column if I use a commands column

When I try to add a row, the <Required()> validations are executed from the client as expected, but the validation bubble's arrow is pointing to the wrong column.  If I put the command column before the bound columns, the validation message appears one column too far to the right.  If I put the command column after the bound columns, the validation message appears one column too far to the left. 


Model
I've decorated my model with validation attributes, eg....

Public Class AppraiserMetaData
    Public Property AppraiserId As System.Guid

    <Required()>
    Public Property sAMAccountName As String

    <Required()>
    Public Property AppraiserSpecialtyName As String

    <Required()>
    <StringLength(2)>
    Public Property AppraiserTypeAbbrev As String

    <Required()>
    Public Property EmployeeTypeName As String

    <Required()>
    Public Property StateAbbrev As String

    <Required()>
    Public Property CountyName As String
End Class




View
    @Code
        Html.Kendo().Grid(Of InternalAppraisal.Entities.Appraiser)() _
        .Name("AppraiserGrid") _
        .Columns(
            Sub(c)
                    c.Command(Function(cmds)
                                      cmds.Edit()
                                      cmds.Destroy()
                                      Return cmds
                              End Function)
                    c.Bound(Function(p) p.FirstName).Title("First")
                    c.Bound(Function(p) p.LastName).Title("Last")
                    c.Bound(Function(p) p.AppraiserSpecialtyName).Title("Specialty")
                    c.Bound(Function(p) p.AppraiserTypeAbbrev).Title("Appraiser Type")
                    c.Bound(Function(p) p.CountyName).Title("County")
                    c.Bound(Function(p) p.EmployeeTypeName).Title("Type")
                    c.Bound(Function(p) p.sAMAccountName).Title("sAMAccountName")
                    c.Bound(Function(p) p.StateAbbrev).Title("State")
            End Sub) _
        .DataSource(
            Function(d)
                    Return d _
                        .Ajax() _
                        .Model(Function(model)
                                       model.Id(Function(aprsr As InternalAppraisal.Entities.Appraiser) aprsr.AppraiserId)
                                       model.Field(Function(aprsr) aprsr.AppraiserId).Editable(False).DefaultValue(Guid.NewGuid())
                                       model.Field(Of String)("FirstName").Editable(False)
                                       model.Field(Of String)("LastName").Editable(False)
                                       Return (model)
                               End Function) _
                        .Create(Function(c) c.Action("Appraiser_Create", "Appraiser")) _
                        .Read(Function(r) r.Action("Appraisers_Read", "Appraiser")) _
                        .Update(Function(u) u.Action("Appraiser_Update", "Appraiser")) _
                        .Destroy(Function(de) de.Action("Appraiser_Delete", "Appraiser")) _
                        .Events(
                            Function(events)
                                    Return events.Error("error_handler")
                            End Function)
            End Function) _
        .ToolBar(Function(t) t.Create()) _
        .Sortable() _
        .Scrollable() _
        .Filterable() _
        .Render()
    End Code

Is this a bug in one of telerik's libraries, or did I fail to overload something?

In the event that this is a bug in one of telerik's libraries, what is the recommended technique for suppressing the validation bubble, and instead, displaying the validation messages in an area similar to a validation summary?

Thanks,

Jason

Alexander Popov
Telerik team
 answered on 02 Oct 2014
1 answer
4.9K+ views
I just migrated from the ASP.NET MVC controls, and would like to have the refresh button show on the bottom of the grid like it did in the old controls, is this possible with kendo?

Thanks
Iliana Dyankova
Telerik team
 answered on 02 Oct 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
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?