输入新记录时刷新datagridview? [英] refreshing datagridview when new record enter?
本文介绍了输入新记录时刷新datagridview?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
输入记录后如何刷新datagridview ????
how i can refresh datagridview when my record entered???
推荐答案
您可以为此使用SQlNotification技术...在ASP .NET以及C#.....的GUI部分中进行搜索,因此请在创建记录后对其进行搜索并将其应用到您的应用中
You can use the SQlNotification technique for this ...... and it works both in ASP .NET as well as the GUI part of C# ..... so search for it and apply it in your app
,然后创建一个新的方法,例如
无效的bind()
{
//这里编写sql连接代码并将您的记录绑定到datagridview
}
page_load(object o,eventargs e)
{
if(!Ispostback)
{
bind();
}
}
after creating your record then create a new method like
void bind()
{
//here write the sql connection code and bind your record to datagridview
}
page_load(object o,eventargs e)
{
if(!Ispostback)
{
bind();
}
}
这将在Web应用程序中起作用
This will work in web applications
GridView.DataBind();
这篇关于输入新记录时刷新datagridview?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文