如何在asp.net Web应用程序中更新gridview中的行 [英] how to update rows in gridview in asp.net web application
问题描述
我有一个包含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屋!