通过网格视图获取输入值 [英] Getting Input Values Through Grid View

查看:67
本文介绍了通过网格视图获取输入值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我需要动态显示当前星期日期作为gridview标头,并且如果需要,还可以通过选择放置在gridview上的控制按钮来显示前一周的详细信息.并且在保存或更新标题行中有关日期的数据时. 但是,如果您想要网格视图值,请使用Foreach循环
创建实例,如

foreach(GridViewRow gr in Grid.rows)
{
    string varname= Grid.Rows[i].Cells[0].Text;
    i++;
}


也许您想这样做:
如果没有,请说明您的问题.

grid1.HeaderRow.Cells[1].Text = DateTime.Now.DayOfWeek.ToString(); 


Hi I need to display current week date''s as gridview header dynamically and also display previous week details if required by selecting control button placed on gridview. And while saving or updating data with respect to date in header row.

解决方案

Your Question Not Clear To Me
But If You Want Grid View Values Take Foreach Loop
Create Instance like

foreach(GridViewRow gr in Grid.rows)
{
    string varname= Grid.Rows[i].Cells[0].Text;
    i++;
}


Perhaps you want to do this:
If not, Please explain your question.

grid1.HeaderRow.Cells[1].Text = DateTime.Now.DayOfWeek.ToString(); 


这篇关于通过网格视图获取输入值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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