从未绑定的gridview中删除行 [英] Deleting rows from an unbound gridview

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

问题描述

我的表单上有一个gridview,我使用

datareader进行了填充。我想做的是能够从gridview中删除指定的

记录,而不会影响数据来源。


我是对于如何删除行感到困惑 - 到目前为止我所做的所有

谷歌搜索似乎都假设网格视图

已绑定且程序员想要从原始的

源中删除数据。有没有简单的方法可以做到这一点 - 即从

网格中删除第x行?


我将不胜感激为此提供任何帮助!


格雷格。

I have a gridview on my form which I have populated using a
datareader. What I would like to do is to be able to remove specified
records from the gridview, without affecting the source of the data.

I''m a bit confused about how to go about removing the rows - all the
google searches I have done so far seem to assume that the grid view
is bound and the programmer wants to delete the data from the original
source. Is there any easy way to do this - i.e. delete row x from the
grid?

I''d be grateful for any help with this!

Greg.

推荐答案

" Greg" < sp ********** @ yahoo.co.ukwrote in message

news:11 ****************** **** @ a75g2000cwd.googlegr oups.com ...
"Greg" <sp**********@yahoo.co.ukwrote in message
news:11**********************@a75g2000cwd.googlegr oups.com...

>我的表单上有一个gridview,我使用
$填充b $ b datareader。我想做的是能够从gridview中删除指定的

记录,而不会影响数据源。
>I have a gridview on my form which I have populated using a
datareader. What I would like to do is to be able to remove specified
records from the gridview, without affecting the source of the data.



你的意思是你想删除客户端的行,一旦页面实际上已经渲染了
,或者你想要防止当数据绑定时某些行被渲染到页面上??

Do you mean you want to remove the rows client-side once the page has
actually been rendered, or do you want to prevent certain rows from being
rendered to the page as the data is being bound...?


2月1日,19:19," ; Mark Rae < m ... @ markNOSPAMrae.comwrote:
On 1 Feb, 19:19, "Mark Rae" <m...@markNOSPAMrae.comwrote:

" Greg" < spammesil ... @ yahoo.co.ukwrote in message


新闻:11 ********************* *@a75g2000cwd.googlegr oups.com ...
"Greg" <spammesil...@yahoo.co.ukwrote in message

news:11**********************@a75g2000cwd.googlegr oups.com...

我的表单上有一个gridview,我使用

datareader进行了填充。我想做的是能够从gridview中删除指定的

记录,而不会影响数据源。
I have a gridview on my form which I have populated using a
datareader. What I would like to do is to be able to remove specified
records from the gridview, without affecting the source of the data.



你的意思是你想删除客户端的行,一旦页面实际上已经渲染了
,或者你想要防止当数据被绑定时,某些行被呈现给页面

...?


Do you mean you want to remove the rows client-side once the page has
actually been rendered, or do you want to prevent certain rows from being
rendered to the page as the data is being bound...?



后者,我想,但我希望做的是实际上

从服务器端网格视图对象中删除行,不只是拒绝

来渲染这些行。


谢谢,


格雷格。

The latter, I suppose, but what I was hoping to do was to actually
remove the rows from the server side grid view object, not just refuse
to render those rows.

Thanks,

Greg.


" Greg" < sp ********** @ yahoo.co.ukwrote in message

news:11 ****************** ****@v33g2000cwv.googlegr oups.com ......
"Greg" <sp**********@yahoo.co.ukwrote in message
news:11**********************@v33g2000cwv.googlegr oups.com...

但我希望做的是实际删除
$中的行b $ b服务器端网格视图对象,而不仅仅是拒绝渲染那些行。
but what I was hoping to do was to actually remove the rows from the
server side grid view object, not just refuse to render those rows.



有什么区别......?

What''s the difference...?


这篇关于从未绑定的gridview中删除行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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