在asp.net的GridView中创建行 [英] creating the row in gridview asp.net

查看:70
本文介绍了在asp.net的GridView中创建行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 谁能说我可以从gridview中仅上传10行值.
例如,如果我通过编码创建了10行,则意味着它应该仅从excel工作表中上传10行值,而不是所有值.

解决方案

代码.然后收集这些行并通过您的机制上传.

 foreach(GridViewRow行 GridView1.Rows中)
{
  如果(row.RowState = DataControlRowState.Edit)
  {
    // 在此处编写代码
  }
} 



谢谢,
马蒙


hi can any one say me is it possible to upload only the 10 row values from the gridview.
for example if i create 10rows through coding means it should upload only the 10 row values from excel sheet not all the values.

解决方案

You can find edited row by the bellow code. Then collect those rows and upload by your mechanism.

foreach(GridViewRow row in GridView1.Rows)
{
  if (row.RowState = DataControlRowState.Edit)
  {
    //wirite your code here
  }
}



Thanks,
Mamun


这篇关于在asp.net的GridView中创建行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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