Current filter:
                                You should refresh the page.
                                  • This is actually a two part question.

                                    One is it possible to pass parameter to the gridview's endcallback clientside event handler from the gridview's CallbackRouteValues handler int he controller?

                                    In the gridview's begincallback event handler in the client side I can pass parameters to the gridview's CallbackRouteValues int he controller as shown below.

                                    I do not have a direct reference to the gridvew that I know in the CallbackRouteValues handler.

                                      public static void CreateNarsOpenStatusGridViewPartial(this GridViewSettings settings)
                                            {
                                                settings.Name = HMAStringResource.GridViewName;
                                                settings.CallbackRouteValues = new { Controller = "NARS", Action = "NarsOpenStatusGridViewPartial" };
                                                settings.ClientSideEvents.BeginCallback = "function(s, e) { OnNarsGridBeginCallback(s, e); }";
                                    ......
                                     function OnNarsGridBeginCallback(s, e) {
                                       e.customArgs["groupNameList"] = GroupNameModels;
                                            e.customArgs["groupName"] = window.cbxGroupNameId.GetText();
                                            e.customArgs["groupCode"] = window.cbxGroupNameId.GetValue();
                                            e.customArgs["userId"] = $("#idUserId").val();
                                            e.customArgs["startDate"] = dsMoment.toJSON();
                                            e.customArgs["endDate"] = deMoment.toJSON();
                                            e.customArgs["index"] = $("#idChartIndex").val();

                                        }
                                    ..........................

                                      public ActionResult NarsOpenStatusGridViewPartial(List<GroupNameHMAResource> groupNameList
                                                , string groupName
                                                , string groupCode
                                               , string userId
                                                , DateTime? startDate
                                                , DateTime? endDate
                                                , int? index)
                                            {

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                If I understand your task correctly, you need to get values from the server side in the EndCallback event handler without performing a callback. If so, I suggest you store required information in JSProperties properties for rows that are currently visible on a page.
                                Handle the GridViewSettings.CustomJSProperties event to pass server data to the client side. For example, you can pass a list or dictionary that contains the required values.
                                Please see the How to Access Server Data on the Client Side article for more information.
                                Let us know if this approach meets your requirements.

                                • steve frierdich 10.04.2019

                                  I believe you did not answer my question or did not understand it.
                                  I want to pass  values from the server side gridview callback event handler to  in the EndCallback event handler .

                                  THIS MEAN THE GRIDVIEW CALLBACK EVENT HANDLER ON THE SERVER WILL BE CALLED.
                                  I WANT THIS CALLBACK EVENT HANDLE on the server which is called to pass parameters which can be handled in the EndCallBack event handle  which gets called in the client after the gridview callback event handler on the server is called.

                                • steve frierdich 10.04.2019

                                  PS you take awful cute photos

                                • Lanette (DevExpress Support) 10.07.2019

                                  Hello Steve,

                                  The idea I described in the answer is addressed for the same task and should help in your scenario.
                                  Let me clarify this approach. Pass the required value from the callback controller to the GridView's server-side GridViewSettings.CustomJSProperties event handler by using ViewData and then save it in JSProperties in this event handler. After that obtain the resulting JSProperties value in the client-side EndCallback event handler.
                                  See the GridView - How to pass ViewData values to the client side and use in the EndCallBack event handler thread where we discussed how to implement this approach and provided a sample project illustrating it.

                                • steve frierdich 10.09.2019

                                  That kind of sound as a  back ass way to do it.
                                  There is no way to set the parameter in the server and they would show up in the e parameter of the EndCallBack event callback handler in the client code?
                                  function OnNarsGridEndCallback(s, e) {

                                  Why even haven parameter for the EndCallBack event handler if I can not pass custom parameter?

                                • Lanette (DevExpress Support) 10.10.2019

                                  Hello,

                                  At the moment, our GridView extension doesn't provide a special way or property to pass a parameter from the callback action to the client side. The approach with CustomJSProperties that I described above is the only and recommended way to pass required data to the EndCallback event handler during a callback. So, I suggest you use this idea to accomplish your task. Let us know if you have any difficulties with its implementation.