在gridview中删除行 [英] deleting rows in gridview
本文介绍了在gridview中删除行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在这里有疑问,需要您的帮助
我有一个aspx页面,在该页面中,我从用户那里收集信息并将信息存储到列表中,并将列表绑定到gridview作为其数据源...
我的问题是如何删除网格视图中数据源为列表的行,而不是数据库
I have a doubt here, and I need your help
I have a aspx page and in that page am collecting the information form the users and am storing the information to the list, and I bind the list to the gridview as its datasource...
my question is how can we delete the rows in the gridview, whose datasource is list, not the database
推荐答案
您是否尝试过在此网站中进行搜索?这种问题有很多答案.请参阅以下内容:
删除网格中的行 [ gridview行删除asp.net [删除gridview中的记录 [ Codeproject [ ^ ]和 ^ ].
Have you tried searching in this website? There are plenty of answers to this kind of question. See the following:
delete a row in grid[^]
gridview row deleting asp.net[^]
deleting records in gridview[^]
If those are not enough, you can check the search results from Codeproject[^] and Google[^].
在具有列表源的网格视图中删除行的方式是:使用List类的Remove方法.这是通过list.Remove(objectToBeRemoved)
或list.RemoveAt(objectToBeRemoveIndex)
完成的.我不是ASP.Net开发人员,而是WPF,所以我可能走错了路.
The way you delete a row in a gridview that has a source of a List is to use the Remove method of the List class. That is done with thelist.Remove(objectToBeRemoved)
orlist.RemoveAt(objectToBeRemoveIndex)
. I am not an ASP.Net developer, but WPF, so I may not be on the right track.
这篇关于在gridview中删除行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文