This is a migrated thread and some comments may be shown as answers.

data not getting passed to controller from refresh

1 Answer 195 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 20 Mar 2015, 01:50 PM
So for some reason with the following code my values are empty once they get to the controller. 

Anyone have any ideas why? 


Signature of controller.
Public Function UserDetail(userString As String) _

javascript code in view. 

        function openWindow() {
            var grid = $("#AjaxGrid").data("kendoGrid");
            var selectedData = grid.dataItem(grid.select());
            var stringData = JSON.stringify(selectedData);

            var window = $("#UserDetailDiv").data("kendoWindow");
            var PopUpTitle = "User Detail: ";
            
            window.setOptions({
                title: PopUpTitle,
                content: "Loading....."
            });

            $("#UserDetailDiv").data("kendoWindow").refresh({
                url: "/Inquiry/UserDetail",
                data: { userString: stringData },

                success: function (data) {
                  
                },
                error: function (xhr, textStatus, exceptionThrown) {
                    window.close();
                    alert($.parseJSON(xhr.responseText));
                }
            });
            window.open();
            window.center();
        }

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 24 Mar 2015, 09:34 AM
Hi Jeff,

The refresh method cannot pass data to the server when iframe is used, so make sure that is not the case. The code looks correct, so if no iframe is used I would suggest examining the browser's console and network tab for any information that might give us a hint why the values are not passed to the server.

Regards,
Alexander Popov
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Window
Asked by
Jeff
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or