如何在datagrid中显示选定的列值 [英] how to display selected column value in datagrid
本文介绍了如何在datagrid中显示选定的列值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做一个Forum应用程序,其中数据库中有一列(fm_Discription).我想在数据网格中显示该列的第一行数据.我的代码在这里...
GV_Desptn.? = dtRow[0]["fm_Discription"].ToString();
问号(?)是我的疑问...请帮帮我.
解决方案
GV_Desptn.Datasource= dtRow[0]["fm_Discription"].ToString();尝试
GV_Desptn.Rows[0].Cells[0].Text = dtRow[0]["fm_Discription"].ToString(); //Rows[0] Index of row //Cell[0] Index of cell inside indexed row
是您要找的东西吗?〜
如果有帮助,请 投票 和 接受答案 .
Hi, I''m doing a Forum application in which there is a column(fm_Discription) in database. I want to display the first row data of that column in data-grid. Here my code goes...
GV_Desptn.? = dtRow[0]["fm_Discription"].ToString();
The question mark(?) is my doubt... Please help me out.
解决方案
GV_Desptn.Datasource= dtRow[0]["fm_Discription"].ToString();Try it
GV_Desptn.Rows[0].Cells[0].Text = dtRow[0]["fm_Discription"].ToString(); //Rows[0] Index of row //Cell[0] Index of cell inside indexed row
Is it what you looking for :~
Please vote and Accept Answer if it Helped.
GV_Desptn.Rows[0].Cells["fm_Discription"].Value = dtRow[0]["fm_Discription"].ToString();
这篇关于如何在datagrid中显示选定的列值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文