.NET日历 - 使整个单元格执行回发(可点击) [英] .net calendar - making the whole cell perform postback (clickable)

查看:126
本文介绍了.NET日历 - 使整个单元格执行回发(可点击)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经有了一个.NET日历和运行,从数据库带来的信息。默认情况下,天数有一个回行动适用于它。

我想要做的是有行动适用于整个单元,因此用户不需要点击只是文字链接。

我是dayRenderer动作我有以下行,试图复制我不知道如何设置的动作,但第二个参数。

这似乎给它一个ID例如3315,但我不知道如何手动获得所需的ID,此code以下。我希望这是有道理的!我是新来的.NET所以不是很精明的术语来!

  e.Cell.Attributes.Add(onclick事件,
    的String.Format(JavaScript的:__ doPostBack({0},{1}),
    Calendar1.ClientID,*** *** ID_NEEDED_HERE));
 

解决方案

参数是天自2000年1月1日的数字为您的日历,通过一个Vpceded $ P $的第一天。

所以,'V0'的ID是指2000年1月1日,V5的ID是指2000年1月6日,对V-5是指1999年12月27日一个ID。

干杯,

鲁本

I've got a .net calendar up and running and bringing information from a database. By default the day number has a post back action applied to it.

What I'm trying to do is have that action apply to the whole cell so the user doesn't need to click on just the text link.

I'm the dayRenderer action i have the following line to try and replicate the action but the second argument I'm not sure how to set it.

It appears to give it an id e.g. 3315 but I'm not sure how to get the required id manually for this code below. I hope this makes sense! I'm new to .NET so not very savvy with my terminology!

e.Cell.Attributes.Add("OnClick", 
    string.Format("javascript:__doPostBack('{0}','{1}')", 
    Calendar1.ClientID, ***ID_NEEDED_HERE***));

解决方案

The parameter is the number of days since Jan 1 2000 for the first day of your calendar, preceded by a 'V'.

So an ID of 'V0' means Jan 1 2000, an ID of 'V5' means Jan 6 2000, an ID of 'V-5' means Dec 27, 1999.

Cheers,

Ruben

这篇关于.NET日历 - 使整个单元格执行回发(可点击)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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