Welcome Guest Search | Active Topics | Sign In | Register

Adding 2 contextmenu to a datepicker Titletemplate in codebehind. Options
bskumar
Posted: Sunday, October 25, 2009 3:18:32 AM
Rank: Member
Groups: Member

Joined: 9/22/2009
Posts: 24
Hi there,

I am creating a "DatePicker- WebCustomControl" for a GridCalndarColumn. I added 2 context menu's for month and year to a date picker.I added javascript code in a JS file and included. MonthMenu is showing, But "YearMenuClick" is event is not firing. following is a code snippet.


Code: C#
picker = new EO.Web.DatePicker();
..................
..................
..................
ContextMenu cmYearMenu = new ContextMenu();
..............
..............
..............
cmYearMenu.ClientSideOnItemClick = "javascript:return YearMenuClicked(event,this);";
..............
..............
.............
cmYearMenu.LookItems.Add(mnuYear);
cmYearMenu.LookItems.Add(mnuYearScrollDown);
cmYearMenu.LookItems.Add(mnuYearScrollUp);

picker.TitleTemplate = new ClientTemplate();

picker.TitleTemplate.Text = "{var:visible_date:MMMM}<a id=\"A3 \" href=\"javascript:ShowMonthPopup('{var:clientId}', '{var:clientId}_month');\"><img src=\"{img:00020012}\" border=\"0\" /></a>{var:visible_date:yyyy}<a id=\"A4\" href=\"javascript:ShowYearPopup('{var:clientId}', '{var:clientId}_year');\"><img src=\"{img:00020012}\" border=\"0\" /></a>";

...............
.............
container.Controls.Add(picker);
container.Controls.Add(cmMonthMenu);
container.Controls.Add(cmYearMenu);



But if I add only Year Menu, then "YearMenuClick" event is firing. how to add 2 context menu's to a title temple in code behind.


eo_support
Posted: Sunday, October 25, 2009 1:28:23 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.