首页 > 解决方案 > ASP.NET MVC:我的 webgrid 的排序列执行错误的操作

问题描述

我被困在这个问题上:我有一个 ajax 按钮可以在页面中添加一个 gridview,到目前为止它可以工作,但是当我想对其中一个列进行排序时,它会将我发送到一个页面,其中包含我的 gridview 的结果

在此处输入图像描述

在此处输入图像描述

@using (Ajax.BeginForm("GetDataGridDoc", new AjaxOptions
                                             {
                                                 HttpMethod = "GET",
                                                 InsertionMode = InsertionMode.Replace,
                                                 UpdateTargetId = "ResultDataGrid",
                                             }))
{
     .........
     <div id="ResultDataGrid">
        @if (Model.DatepickerBegin != null && Model.DatepickerTo != null)
        {
            {Html.RenderAction("GetDataGridDoc");}
        }
   </div>
}

在我的行动中:

IEnumerable<Document> test = _resultRecherche.ListeDesDocuments.ToList();

return PartialView("_ResultatRecherche", test);

你有想法吗 ?

谢谢

标签: asp.net-mvcwebgrid

解决方案


好的,我发现,这是我的 webgrid 中的布丁 Ajax 参数...


推荐阅读