Telerik Forums
UI for ASP.NET MVC Forum
1 answer
1.2K+ views

Hi,

I have a Kendo Grid in which I use Data method in Read.Action to pass parameters to a controller action. The code is:

<% Html.Kendo().Grid<EvaluationsQuestionsEvaluationPillarsGridViewModel>()
            .Name("Pillars")
            .DataSource(dataSource => dataSource
                  .Ajax()
                  .Model(model => model.Id(a => a.EvaluationMasterPillarId))
                  .ServerOperation(true)
                  .Read(read => read.Action("LoadEvaluationsQuestionsEvaluationPillarsGridAjax", "Evaluations")
                                    .Data("onLoadEvaluationsQuestionsEvaluationPillarsGridData"))
             )​
......

        function onLoadEvaluationsQuestionsEvaluationPillarsGridData(e) {
            var evaluationVersionId = $('#evaluationVersionId').val();  // "evaluationVersionId" is set beforehand
            var showDeletedCheckbox = $('#Checkbox1').val();

            return { evaluationVersionId: evaluationVersionId, showDeleted: showDeletedCheckbox }
        }

        public ActionResult LoadEvaluationsQuestionsEvaluationPillarsGridAjax(DataSourceRequest request, string evaluationVersionId, bool showDeleted)
        {
......

But the controller action "LoadEvaluationsQuestionsEvaluationPillarsGridAjax" is not even invoked. I need help on this. Thanks.

 

Dimiter Madjarov
Telerik team
 answered on 18 Nov 2015
1 answer
2.4K+ views

​Hi there, I was wondering if someone could help me.  How can I bind my dropdown list to a viewbag to ensure it's getting it's data from the right place?  I found a couple of guides but they didn't work for my scenario.  Here is my code.

// #DDL - Broker Companies
       
      IEnumerable<SelectListItem> thestats = seabrokersData.tbl_requirement_status
           
          .Select(c => new SelectListItem
          {
              Value = c.id.ToString(),
              Text = c.thet_status
          });
      ViewBag.theStatus = theStatus;

 

I would like my Kendo Dropdown to use the above viewbag to populate itself.  How can I do this?

Many thanks

 

 

 

Boyan Dimitrov
Telerik team
 answered on 18 Nov 2015
2 answers
271 views

I'm having some accessibility issues with my Kendo MVC Grid. When using the Tab button I am unable to access the pages options at the bottom left corner of the grid. After looking over your documentation I've seen that pressing ALT + Page Up or ALT + Page Down should allow me to move through the pages. Unfortunately this does not work and I'm unsure what may be causing this issue. Here is an example of my code.

        @(Html.Kendo().Grid<AuthDTO.ListUserManagement>()
              .Name("ManageUsersGrid")
              .HtmlAttributes(new {style = " width:100%; height:86%"})
              .Pageable()
              .Pageable(pageable => pageable
                .PageSizes(true)
                .Messages(msg => msg.Display("{0:d0} - {1:d0} of {2:d0} items"))
                .Refresh(true))
              .Reorderable(reorder => reorder.Columns(true))
              .Sortable(sort => sort.SortMode(GridSortMode.MultipleColumn))
              .Filterable(ftb => ftb.Mode(GridFilterMode.Row))
              .ColumnMenu()
              .ColumnResizeHandleWidth(10)
              .Resizable(resizable => resizable.Columns(true))
              .Scrollable(o => o.Height("100%"))
              .DataSource(dataSource => dataSource
                  .Ajax()
                  .Read(read => read.Action("GetUsers", "AppUser", new RouteValueDictionary {{"area", "AppUser"}}))
              )
              .Columns(columns =>
              {
                  columns.Bound(o => o.Id)
                      .Filterable(false)
                      .Width(100)
                      .IncludeInMenu(false)
                      .Sortable(false)
                      .Title("Actions")
                      .ClientTemplate(
                          "# if(" + @ViewBag.DOD + " == 'true')  { # +" +
                          "<a href=\"javascript: void(0);\" onclick=\"userEditItem('#: Id #');\" title=\"Edit\"><i class=\"disabled fa fa-pencil-square-o fa-lg\"></i><span class=\"sr-only\"></span></a>"
                          + "# } else { # " +
                          "<a href=\"javascript: void(0);\" onclick=\"userEditItemCAC('#: Id #');\" title=\"Edit\"><i class=\"active fa fa-pencil-square-o fa-lg\"></i><span class=\"sr-only\"></span></a>"
                          + "# } #" +
                          "<a href=\"javascript: void(0);\" onclick=\"impersonate('#: Id #');\" title=\"Impersonate User\"><i class=\"active fa fa-user fa-lg\"></i><span class=\"sr-only\"></span></a>"
                      );
                  columns.Bound(o => o.LastName)
                      .Width(200)
                      .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                  columns.Bound(o => o.FirstName)
                      .Title("First Name")
                      .Width(200)
                      .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                  columns.Bound(o => o.Email)
                      .Title("Email")
                      .Width(250)
                      .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                  columns.Bound(o => o.Phone)
                      .Title("Phone")
                      .Width(250)
                      .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                  columns.Bound(o => o.Organization)
                      .Title("Organization")
                      .Width(250)
                      .Filterable(ftb => ftb.Cell(cell => cell.Operator("contains")));
                  columns.Bound(o => o.Active)
                      .Title("Active")
                      .Width(100)
                      .Filterable(false);
                  columns.Bound(o => o.LockedAccount)
                      .Title("Locked Account")
                      .Width(100)
                      .Filterable(false);
                  columns.Bound(o => o.LockoutDateTime)
                      .Title("Lockout Date Time")
                      .Width(200);
              })

              )

 




Justin
Top achievements
Rank 1
 answered on 17 Nov 2015
1 answer
67 views

Hello,

I have a problems with @(Html.Kendo().Editor() in Vistual Studio 2015 ASP.NET 5 MVC 6 beta 8 with "Kendo.Mvc : 2015.3.1111".

No overload for method '​Editor' takes 0 arguments

When will it be available?

Best Regards

Davide

Dimiter Madjarov
Telerik team
 answered on 17 Nov 2015
5 answers
311 views

My use case involves the user editing the content of the editor while the server occasionally updates some of the values in the text

However, when the server sends an update and the editor.value("string") happens, the cursor position is reset to the start of the text, instead of leaving it where it is

I've tried fiddling with selected ranges and such but it doesn't seem to be working

Dimo
Telerik team
 answered on 17 Nov 2015
5 answers
616 views
Hi all!

I'm using the feature described here http://demos.kendoui.com/web/treeview/api.html to filter treeview items by text. 

I already have all nodes loaded (they are not all expanded), but when I apply the filter using the code above, it does not work.

treeview.dataSource.filter({
field: "text",
operator: "contains",
value: filterText
});

Example 

  • Item aa
  • Item bb
    • Item xx
    • Item yy

if search text is "xx", no items are displayed. Instead I would like to have the following result:

  • Item bb
    • Item xx
But if your search text is "aa", "bb" or some string similar to root item texts ... the nodes are displayed

Does anyone knows how to make the filter applying for all nodes?

BTW! I'm using MVC and the last build of Kendo

Thanks!
Alex Gyoshev
Telerik team
 answered on 17 Nov 2015
2 answers
78 views

I'm not sure if this us something that a Keno control could handle but I thought I'd best ask anyway.  On part of my form the user can add multiple entires before submission.  I need to know if it's possible to handle this behaviour with Kendo controls?  I've attached a couple of images to show you what I mean.

The user can add as many items as they want.

Many thanks

 

Allan

Kiril Nikolov
Telerik team
 answered on 17 Nov 2015
1 answer
356 views

Hi,

With filterable->mode set to row, is it possible to filter a date between two dates? I ​found this thread http://www.telerik.com/forums/how-to-define-a-kendo-grid-column-filter-between-two-dates, and currently have ​it applied ​to grid menu filter, but not sure how to make it work when the filterable mode is row.

 

Thanks,

Lisa

 

Vladimir Iliev
Telerik team
 answered on 17 Nov 2015
3 answers
385 views

I am in need of some help, I'm building a web application that uses the KendoUI, specifically the grid to display data.  I've used the entity framework under a "database first" scenario, this means that the models are created for me for all the tables in my database.  I'm displaying this data in the Kendo grid but I can't edit or delete any of the entries (inline with ajax).  If you delete an item it returns when you regresh the screen and the update button does nothing.  I suspect this is because we have no functions to handle these events.

Is there anyway I can utilise the already created scaffolded controller to do this as it already as an edit and delete function in it.

 Any help would be appreciated.

Kiril Nikolov
Telerik team
 answered on 17 Nov 2015
1 answer
69 views
I'm having some issues with the Grid paging in Kendo MVC. Everything on the grid is accessible except the paging options in the bottom left corner. I should be able to use ALT + Page Up or ALT + Page Down, but these do not work. Any idea what may be causing this issue?
Plamen
Telerik team
 answered on 17 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?