سؤال

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