문제

I have a WebGrid declared as below:

WebGrid grid = new WebGrid(rowsPerPage: Model.RowsPerPage, ajaxUpdateContainerId: "WebGrid");

I noticed where ever there is a data-swhglnk="true" attribute in a <a></a> e.g. Columns for sorting, the asynchronous behavior occurs and my WebGrid is updated.
I want to tap into the same behavior without much change to update the WebGrid on my custom interaction like user passed a filter string from a textbox or changed the number of rows per page from a dropdown, etc.
I also noticed that a big number is sent to the server like http://localhost:6066/Grid?sort=ID&sortdir=ASC&__swhg=1388556493888 when there is data-swhglnk="true".
Can someone please shed some light on this matter?

도움이 되었습니까?

해결책

Basically, I had to resort to doing my own custom ajax call and replacing the div with returned data. I could not tap into WebGrid's async behavior with my own callbacks.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top