如何在我的kendoUI网格中显示插入的记录而不使用iframe引用页面 [英] how to show a inserted record in my kendoUI grid without refereshing the page by using iframe

查看:76
本文介绍了如何在我的kendoUI网格中显示插入的记录而不使用iframe引用页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Grid.aspx页面中有一个kendoui网格,它显示了来自sqlserver的数据,然后我在Grid.aspx页面中添加一个id:framebtn的按钮,当我点击framebtn时另一个页面(WebForm1.aspx)将使用ifram弹出窗口。在我的WebForm1.aspx中,我有一个文本框(通过id =" txtName")和一个按钮(btnRegist),当你点击WebForm1.aspx中的btnRegist时,它将txtName中的所有内容插入我的sqlserver然后你就可以看到它了在Grid.aspx中的kendoui网格上如果你在插入后刷新Grid.aspx页面...我希望能够在iframe中自动插入记录后重新绑定我的kendoui网格而不刷新页面?????任何团体可以帮助我吗?

i have a kendoui grid in my Grid.aspx page that shows my data from sqlserver, and then i add a button by id:framebtn in Grid.aspx page,when i click on framebtn another page (WebForm1.aspx) will popup by using ifram. in my WebForm1.aspx i have a textbox(by id="txtName") and one button(btnRegist) and when you click on btnRegist in WebForm1.aspx it insert every thing in the txtName to my sqlserver and then you can see it on kendoui grid in Grid.aspx if you refreshing the Grid.aspx page after inserting... i want to a way to rebind my kendoui grid after inserting a record in iframe automatically without refreshing the page????? any body can help me please?

推荐答案

同域



如果两个页面都在同一个域中,然后您可以通过 window.parent 轻松地从子页面与父页面进行通信。



您可以通过 window.parent.someFunction(argument1,argument2)调用父页面的函数;

您可以传递任意数量的根据父页面中的函数签名的参数。



因此,在 WebForm1.aspx 页面中更新后,只需按上述方法调用父函数并更新网格。



不同域名



如果父和子都在不同的域中,那么你必须使用 window.postMessge 技术进行通信。为了检查我的提示 - 与跨域IFrame的通信 - 交叉浏览器解决方案 [ ^ ]。
Same domain

If both the pages are in same domain, then you can easily communicate from child with parent page by window.parent.

You can call a function of parent page by window.parent.someFunction(argument1, argument2);.
You can pass any number of arguments according to the function signature in parent page.

So, after the update in WebForm1.aspx page, just call the parent function as said above and update the Grid.

Different domain

If both parent and child are in different domain, then you have to use window.postMessge technique for communication. For that check my tip - Communication with Cross Domain IFrame - A Cross Browser Solution[^].


这篇关于如何在我的kendoUI网格中显示插入的记录而不使用iframe引用页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆