如何在c#4层架构中查看,插入,更新,删除gridview [英] How to view,insert,update,delete gridview in c# 4 tier architecture
本文介绍了如何在c#4层架构中查看,插入,更新,删除gridview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
朋友,
我有一个gridview.But我不知道如何查看,插入,更新,删除gridview操作在4层架构中。我是gridview.Plz的新手帮帮我。
提前致谢
Friends,
I have a gridview.But I do no how to view,insert,update,delete the gridview operation in 4 tier architecture.I am new to gridview.Plz help me.
Thanks in advance
推荐答案
请参阅关于网格视图编辑,更新,使用N层架构删除。 [ ^ ]。
插入,更新,搜索和删除(CRUD操作)
Insert, Update, Search and Delete (CRUD operation) using ASP.Net and MySQL
如果您使用数据库表将GridView的DataSource绑定到表
GridView1.DataSource = table;
如果你需要手动添加它。使用下面代码
this.GridView1.Rows.Add ();
this.GridView1.Rows [rowIndex] .Cells [columnIndex] .Value =;
this.GridView1.Rows [rowIndex] .Cells [columnIndex ] .Value =;
用于更新和重新安装Gid:
GridView1.update ();
GridView1.refresh();
If your using Database table bind the GridView's DataSource to Table
GridView1.DataSource = table;
If you need to add it manually.use below code
this.GridView1.Rows.Add();
this.GridView1.Rows[rowIndex].Cells[columnIndex].Value = " ";
this.GridView1.Rows[rowIndex].Cells[columnIndex].Value = " ";
For Updating and Refreching the Gid.:
GridView1.update();
GridView1.refresh();
这篇关于如何在c#4层架构中查看,插入,更新,删除gridview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文