如何在asp.net Web应用程序中更新gridview中的行 [英] how to update rows in gridview in asp.net web application

查看:72
本文介绍了如何在asp.net Web应用程序中更新gridview中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含UserID,TaskID,ReminderDate,Task,TaskType,TaskStatus,EmailID等列的gridview



这里TaskType是每日,每周,每月,每年,今天,没有。



现在我需要根据条件在表格中插入一个新行(当提醒日期中的日期与今天的日期匹配时)。 br />


这是我能够做到但问题是如果多行满足这个条件的方式。

解决方案

< blockquote>我不明白为什么你需要插入一个新行?新行有什么作用?你不能只为满足条件的任务着色吗?如果你想为每一行着色或做任何事情(测试每一行的条件)使用OnRowDatabound事件...



另一个好的解决方案就是拥有另一张表获取满足条件的所有项目(提醒)并加载供用户查看。



问候,

Ibrahim karakira


http://www.highoncoding.com/Articles/98_Adding_a_New_Row_in_GridView.aspx [ ^ ]


I have a gridview containing columns like UserID,TaskID,ReminderDate,Task,TaskType,TaskStatus,EmailID

Here TaskType is Daily,Weekly,Monthly,Yearly,Today,None.

Now i need to insert a new row in the table as per a condition (when the date in the Reminder Date matches with today's Date).

this i am able to do but the problem is how if more than one row satisfy this condition.

解决方案

I didnt understand why you need to insert a new row? what does the new row do? cant you just color the tasks that satisfy the condition? If you want to color or do anything per each row ( test the condition on each row) use OnRowDatabound event...

another good solution would be to have another table that gets all the items that satisfy the condition(reminders) and loaded for the user to see.

Regards,
Ibrahim karakira


http://www.highoncoding.com/Articles/98_Adding_a_New_Row_in_GridView.aspx[^]


这篇关于如何在asp.net Web应用程序中更新gridview中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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