如何从gridview中删除一行但不从数据库中删除 [英] how to remove a row from gridview but not from database

查看:64
本文介绍了如何从gridview中删除一行但不从数据库中删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我正在使用Gride View,在网格视图中DataSource是Session(ItemTable)。现在我需要删除gridview行同时删除Session(ItemTable)表respecetd行可以任何一个请帮助我

Hi i am using Gride View ,in the grid view DataSource is the Session("ItemTable"). now i need the remove the gridview row at same time to remove the Session ("ItemTable") table respecetd row Can any one Please Help me

推荐答案

首先使用会话用于存储大数据,例如 DataSource 不是一个好习惯。



此外,您从数据库获得的价值为 DataSource 。在绑定GridView之前,从 DataSource 中删除​​行数据。 GridView仅用于显示数据。它只不过是一张桌子。



问候.. :)
First of all using Session to store large data such as DataSource is not a good practice.

Further, you are getting value from database into DataSource. Remove the row data from DataSource before binding the GridView. GridView is used just to display data. It's not more than just a table.

Regards..:)


这篇关于如何从gridview中删除一行但不从数据库中删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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