首页 新闻 搜索 专区 学院

高手请进,着急提交 datagridview

0
悬赏园豆:50 [已关闭问题]
<table border="0"> <tbody> <tr> <td> <p>&nbsp;</p> <p>58643</p> <p>&nbsp;</p> </td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:53:00</td> <td>4.19</td> </tr> <tr> <td>58644</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:53:25</td> <td>4.19</td> </tr> <tr> <td>58645</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:53:49</td> <td>4.19</td> </tr> <tr> <td>58646</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:54:13</td> <td>4.18</td> </tr> <tr> <td>58647</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:54:38</td> <td>4.19</td> </tr> <tr> <td>58648</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:55:02</td> <td>4.18</td> </tr> <tr> <td>58649</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:55:26</td> <td>4.19</td> </tr> <tr> <td>58650</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:55:50</td> <td>4.19</td> </tr> <tr> <td>58651</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:56:14</td> <td>4.18</td> </tr> <tr> <td>58652</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:56:39</td> <td>4.19</td> </tr> <tr> <td>58653</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:57:03</td> <td>4.18</td> </tr> <tr> <td>58654</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:57:28</td> <td>4.18</td> </tr> <tr> <td>58655</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:57:52</td> <td>4.18</td> </tr> <tr> <td>58656</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:58:16</td> <td>4.19</td> </tr> <tr> <td>58657</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:58:40</td> <td>4.18</td> </tr> <tr> <td>58658</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:59:04</td> <td>4.19</td> </tr> <tr> <td>58659</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:59:29</td> <td>4.19</td> </tr> <tr> <td>58660</td> <td>UT12_B_01.36:</td> <td>2009-7-5</td> <td>17:59:53</td> <td>4.19</td> </tr> <tr> <td>59551</td> <td>UT12_B_01.36:</td> <td>2009-7-6</td> <td>0:00:07</td> <td>2.27</td> </tr> <tr> <td>59552</td> <td>UT12_B_01.36:</td> <td>2009-7-6</td> <td>0:00:31</td> <td>2.27</td> </tr> <tr> <td>59553</td> <td>UT12_B_01.36:</td> <td>2009-7-6</td> <td>0:00:56</td> <td>2.27</td> </tr> <tr> <td>59554</td> <td>UT12_B_01.36:</td> <td>2009-7-6</td> <td>0:01:20</td> <td>2.27</td> </tr> <tr> <td>59555</td> <td>UT12_B_01.36:</td> <td>2009-7-6</td> <td>0:01:44</td> <td>2.27</td> </tr> <tr> <td>59556</td> <td>UT12_B_01.36:</td> <td>2009-7-6</td> <td>0:00:49</td> <td>2.27</td> </tr> </tbody> </table> <p>&nbsp;</p> <p>ID,UT,Dates,DatesTime,I这几个是我datagridview中的字段,我想获取5号对应I字段下的值,但是我5号的记录是不固定的。而且这些记录是datagridview中的。请各位高手指教。谢谢着急!</p>
Wennie的主页 Wennie | 初学一级 | 园豆:55
提问于:2009-07-13 13:42
< >
分享
其他回答(2)
0

dategridview.datasource.defaultView.sort

对控件的数据源进行查询。

邢少 | 园豆:10926 (专家六级) | 2009-07-13 14:06
0

好像没描述清楚啊。

你的5号是对应ID的5号吗,可以直接库里取或者数据源中Find;

如果5号是View上的号:

dataGridView1.Rows[4].Cells["I"].ToString();

winzheng | 园豆:8797 (大侠五级) | 2009-07-13 18:53
0

DataRowView drv = (DataRowView)e.Row.DataItem;

string result = drv["I"].ToString();

Insus.NET | 园豆:932 (小虾三级) | 2009-07-15 10:35
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册