如何获取gridview的值并将其显示到窗口应用程序中的另一个页面 [英] how to take value of gridview and show it to another page in window application

查看:67
本文介绍了如何获取gridview的值并将其显示到窗口应用程序中的另一个页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何获取gridview的值并将其显示到窗口应用程序中的另一个页面

how to take value of gridview and show it to another page in window application

推荐答案

您可以使用复选框将所选行从一个页面传递到另一个页面。 ..
you can use checkboxes to pass the selected rows from one page to another...


试试这个



try this

private void dgvItemsList_CellEndEdit(object sender, DataGridViewCellEventArgs e)
{
   switch (e.ColumnIndex)
    {
               case 1: string strValue = dgv.Rows[e.RowIndex].Cells[0].Value;
                       //do your navigation
                       //form1 frm=new form1();
                       //form1.yourstring=strValue;
                       //form1.show();
                      break;
        }
}







删除你的标签asp.net因为你的要求Windows应用程序,但您选择标记为asp.net




remove your tag asp.net because your asking windows application, but you are selecting tag as asp.net


这篇关于如何获取gridview的值并将其显示到窗口应用程序中的另一个页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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