This is a migrated thread and some comments may be shown as answers.

Grid refresh is broken in 2013.3.1316.340

5 Answers 61 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Oleg
Top achievements
Rank 1
Oleg asked on 21 Jan 2014, 06:23 PM
I have a very simple page , which displays Log4Net entries on the page. It has a grid with a refresh button.
When I hit the  refresh button, I do supply additional parameter to the refresh function.
It works in 2013.3.1119 and before, but that functionality is broken in 2013.3.1316.340.

The Page:
@using Monitoring.Contracts.Models
@model  Tuple<IEnumerable<string>, IEnumerable<Log4NetLogItem>>
@{
    var items = Model.Item1.Select(m => new SelectListItem {Text = m, Value = m});
}

<div style="width: 100%;text-align: center">
    <div style="display: inline-block">
        Log4NET Log Viewer &nbsp; 
        @(Html.Kendo().DropDownList()
              .Name("ddLogFiles")
              .DataTextField("Text")
              .DataValueField("Value")
              .Events(e => e.Change("adminContext.ddLogFilesChange"))
              .BindTo(items)
              .SelectedIndex(0)
              )
    </div>
    <br/><br/>
    <div style="text-align: left">
        @(Html.Kendo().Grid(Model.Item2).Name("grdLogItems")
        .Columns(c =>
                     {
                         c.Bound(a => a.LogDate).ClientTemplate("#= kendo.toString(LogDate, \"yyyy-MM-dd HH:mm:ss\") #").Width("10%");
                         c.Bound(a => a.LogLevel).Width("5%");
                         c.Bound(a => a.UserName).Width("10%");
                         c.Bound(a => a.UserAddress).Width("10%");                        
                         c.Bound(a => a.LoggingClass).Width("10%");
                         c.Bound(a => a.LogMessage).Width("45%");
                         c.Bound(a => a.UserAgent).Width("20%");
                     }
        )       
        .Pageable(p=>p.PageSizes(new[]{5,20,100}).Refresh(true))
        .Sortable() 
        .Filterable() 
        .Scrollable(a=>a.Height(500))   
        .Resizable(a=>a.Columns(true))   
        .DataSource(d=>d.Ajax().PageSize(100).ServerOperation(false).Read(r=>r.Action("GetLogEntries","Admin").Data("adminContext.extraLogData")))
        )
    </div>
</div>
Controller Action:

 
public ActionResult GetLogEntries([DataSourceRequest]DataSourceRequest request, string fileName)
        {
            string path = Server.MapPath("~\\Logs");
            var newpath = string.Format("{0}\\{1}{2}", path, fileName, ".log");
            IEnumerable<Log4NetLogItem> lines = ClientNetworkManager.GetLogItems(newpath);
            return Json(lines.ToDataSourceResult(request));
        }

Javascript function:
extraLogData: function () {
        var dropdownlist = $("#ddLogFiles").data("kendoDropDownList");
        return { fileName: dropdownlist.value() };
    }

Javascript correctly returns the fileName parameter, but the controller's fileName parameter is now always null. 
And as I said it works in  2013.3.1119 .
Looking into the raw HTML request  I'm no longer see fileName as a part of the Form data.






5 Answers, 1 is accepted

Sort by
0
Jon
Top achievements
Rank 1
answered on 23 Jan 2014, 06:40 PM
We are having the exact same issue. The additional parameters in an Ajax post are being sent as null to the controller since we did the update. Worked fine before.
0
Jon
Top achievements
Rank 1
answered on 23 Jan 2014, 10:08 PM
Attached is a simple standalone project with the new update that shows how it is now broken.
0
Jon
Top achievements
Rank 1
answered on 24 Jan 2014, 02:41 PM
The latest internal build fixed the issue. Look for 2013.3.1321.440. It fixed it for us!
0
Daniel
Telerik team
answered on 27 Jan 2014, 12:36 PM
Hello All,

This is a known bug in the service pack which is fixed in the latest internal build. The fix will also be available in the second service pack which will be released in few days.

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Shawn
Top achievements
Rank 2
answered on 27 Jan 2014, 07:54 PM
This one makes for a bit of egg-on-face...sad.
Tags
Grid
Asked by
Oleg
Top achievements
Rank 1
Answers by
Jon
Top achievements
Rank 1
Daniel
Telerik team
Shawn
Top achievements
Rank 2
Share this question
or