自定义Gridview ....面临2个问题....... [英] Customize Gridview....facing 2 Problems.......

查看:83
本文介绍了自定义Gridview ....面临2个问题.......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个4列的gridview....时间,拼贴,个人和提醒

第一栏中的+是图像按钮,而8am是链接按钮8 am、9am、10am ..... etc

来自与daytime.xml的GridView绑定...

时间||拼贴画||个人||提醒

8 am+

9 am+

上午10点以上

11 am+

12 am+

------

晚上8点以上



问题(1)

我想在Collage,Personal,Reminder Column中显示名为PlannerMaster的表中的数据.

是否有可能在任何xml文件的第一列中显示数据,以及在任何其他表/数据源中的另外3列中显示数据.........

问题(2)

我还想根据保存的事件更改列..的背景色

例如,如果某个个人类别的事件(在我们的gridview列号3中)是从上午8点到上午11点.在这种情况下,我想显示背景为黄色的行从上午8点到上午11点...

拼贴和提醒列的功能相同.....

这将帮助用户可视化他在多长时间内处于忙碌/忙碌状态.....

我已经开始自行解决这些问题了……但是想以一种简单而正确的方式来解决…….所以,如果您有更好的主意或解决这些问题的方法,那么欢迎您.

我们将共同努力…………(如果目标已清除,但我仍未答应..)

请建议..

在此先感谢..........

I have a gridview with 4 columns....time,Collage,Personal and reminder

in first column + is a image Button and 8am is a linkbutton 8am,9am,10am.....etc

are coming from gridview binding with daytime.xml...

time || Collage || Personal || Reminder

8am+

9am+

10am+

11am+

12am+

------

8pm+



Problem (1)

I want to show data from table named PlannerMaster in the Collage,Personal,Reminder Column..

is it possible to show data in First Column From Any xml file And another 3 Columns from any other table/Datasource.........

Problem (2)

I also want to change the backcolor of column ..according to the saved event

For Example if any event for Personal Category (in our gridview Column no. 3) from 8am to 11am..at that condition i want to show the row 8am to 11 am with backcolor Yellow...

same for Functionality For Collage and Reminder Column .....

this will help user to visualize in which time duration he is engegged/busy.....

I have started to solve these tasks by my own...but want to do this in easy and proper manner.... so if u have any better idea, or way to solve these problems then Your Welcome

we will work together............ (if the objective hsnt cleared yet pls clear from me..)

pls suggest..

thanks in advance..........

推荐答案

问题的答案(1)
您需要创建结合数据源数据和xml的DataTable,然后绑定到gridview.我认为这是最简单的处理方法.

对于数据表的创建,插入等,请按照下面的链接
http://programming.top54u.com/post/ASP-Net-Bind- GridView-to-DataTable.aspx [ ^ ]
Answer to Problem (1)
You need to create DataTable combine datasource data and xml, then bind to gridview. I think that''s the easiest way to process.

For Datatable creation,inserting, and etc.., follow the link below
http://programming.top54u.com/post/ASP-Net-Bind-GridView-to-DataTable.aspx[^]


这篇关于自定义Gridview ....面临2个问题.......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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