问题描述
对于每个可排序列标题,将呈现url控制器/操作链接。单击列标题以对GRID进行排序 - 而是执行控制器/操作。如何规避这个?
==================================== ==========================================
按要求澄清:
------------------------
使用Grid.MVC使用可排序的标题/标题显示数据。期望是当单击列标题/标题时,将对数据进行排序,而不是执行控制器操作。原因是HTML包含每个标题/标题列的URL链接。
另一种询问方式是 - 排序功能如何工作 - 我会期望Grid.MVC独立处理排序并重新渲染视图。发生了什么是Grid MVC正在执行一个控制器动作
======================= ================================================== ========
Re:建议在操作方法中处理排序和刷新页面
-------------- -------------------------------------------------- -------
如果Grid MVC没有处理排序并使用新的排序顺序刷新Grid - 为什么要使用Grid MVC?
For each sortable column header a url controller/action link is rendered. When the column header is clicked to sort the GRID - what happens instead is the controller/action is executed. How can this be circumvented?
==============================================================================
As requested to clarify:
------------------------
Grid.MVC is used to present data with sortable Titles/headers. The expectation is when a column title/header is clicked the data will be sorted instead the controller action is executed. The reason is the header the HTML contains a url link for each title/header column.
Another way of asking would be - How does the sort feature work - I would expect Grid.MVC to handle the sorting independently and re-render the view. What is happening is Grid MVC is executing a controller action
=================================================================================
Re: Suggestion to handle sorting and refreshing page in action method
-----------------------------------------------------------------------
If Grid MVC does not handle the sorting and refreshing the Grid with the new sort order - why use Grid MVC?
推荐答案
这篇关于Grid.MVC生成一个data-url:为什么以及如何阻止此选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!