如何在gridview中隐藏选定的行 [英] how to hide selected row in gridview

查看:94
本文介绍了如何在gridview中隐藏选定的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个网格视图



在第一个网格视图中包含一些带有选择按钮的记录。
当我在第一个选择特定记录时
网格视图使用选择按钮,然后记录剩余记录将进入第二个网格视图。



如何编写该代码...

I have two grid views

In 1st grid view contains some records with select button.
when I select particular record on 1st grid view using select button then except that record remaining records will come in 2nd grid view.

How to write code for that one...

推荐答案

使用行命令事件



Use row command event

protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.Row.Cells[2].Text == "Select")
        e.Row.Visible = false;
 }









使用此



Or

Use this

Gridview1.Rows.Item(i).Attributes.Add("style", "display:none")



Hope这会对你有所帮助......


Hope this will help you...


这篇关于如何在gridview中隐藏选定的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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