user1498879
user1498879

Reputation: 59

DevExpress MVC GridView and callbacks

I've successfully added an MVC GridView to an ASP.NET MVC 4 application I'm writing. I've bound it to data successfully, etc.

I've written some JavaScript to store the index field of the selected row to a hidden field...but to do this requires a callback. The FocusedRowChanged client-side event is implemented in JS, and in this event I call GetRowValues for the grid. like this:

  function OnReviewGridFocusedRowChanged() {
         ReviewAdGrid.GetRowValues(ReviewAdGrid.GetFocusedRowIndex(), "AdSequence",    OnReviewGridGetRowValues);
     }

This function requires a callback event:

function OnReviewGridGetRowValues(Value) {
    document.getElementById("ReviewID").value = Value;
}

The OnReviewGridGetRowValues is a callback event where the actual values of the requested fields are returned.

One problem - this callback is NOT being called.

Has anyone had any experience with this? Do I have to do anything special in MVC to work with callbacks?

Thanks.

Upvotes: 0

Views: 3033

Answers (1)

Mikhail
Mikhail

Reputation: 9300

Make sure that you have implemented the GridViewSettings.CallbackRouteValues. Check this KB Article.

Upvotes: 1

Related Questions