如何在另一个girdview中显示gridview的值 [英] how to display the value of a gridview in another girdview
本文介绍了如何在另一个girdview中显示gridview的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在第一个gridview中选择SELECT按钮时,如何在另一个girdview中显示gridview的值
how to display the value of a gridview in another girdview when i select the SELECT button in first gridview
推荐答案
检查此代码,
在gridview的事件SelectedIndexChanged中:
check this code,
in gridview''s event SelectedIndexChanged:
protected void grdView1_SelectedIndexChanged(object sender, GridViewPageEventArgs e)
{
// populate is sample method
//where grdView1.SelectedRow.Cells[1].Text is the ID needed to
//get data to be filled in datagridview2.
grdView1.DataSource= populate(grdView1.SelectedRow.Cells[1].Text);
grdView1.DataBind();
}
希望对您有帮助.
如果回答了您的问题,别忘了投票
谢谢
hope it helps you..
don''t forget to vote if it answers your question
thanks
参考此链接,即使分页后它也会帮助您选择数据
在选中一个GridView中的复选框后,将一个GridView中的行添加到另一个 [ ^ ]
refer to this link it will help u in selecting the data even after paging
Adding rows from one GridView to another after checking a checkbox in one GridView[^]
这篇关于如何在另一个girdview中显示gridview的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文