Hi All,
I am newbie to infragistics, i am desiging an scheduler application, for tat i am using Webdayview, webmonthview, webweekview in seprate forms, i want to link the ultrawebmenu in context for Webdayview, webmonthview, webweekview for displaying a popup when user right clicks.
Is there anyoption available?
Thanks in advance.
-- Vijayanand
HI,
You have to be careful here, because the mouse dbl-click event will bring up the appointment dialog.
A possible solution would be to replace the page's context menu with a menu of your own.
You could use the <body tags oncontextmenu property. Set this property to the following string<body oncontextmenu="BLOCKED SCRIPTigmenu_showMenu('UltraWebMenu1', event); return false;">
Here is the code to my page:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Infragistics2.WebUI.WebSchedule.v8.3, Version=8.3.20083.2039, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebSchedule" TagPrefix="igsch" %>
<%@ Register assembly="Infragistics2.WebUI.UltraWebNavigator.v8.3, Version=8.3.20083.2039, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.UltraWebNavigator" tagprefix="ignav" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title>
<script type="text/javascript" id="Infragistics"><!--
<!--
function WebDayView1_MouseDown(oDayView, oEvent, element){ //Add code to handle your event here. }
// -->
function WebDayView1_Click(oDayView, oEvent, element){ //Add code to handle your event here.// igmenu_showMenu('UltraWebMenu1', event); return false}// --></script></head><body oncontextmenu="BLOCKED SCRIPTigmenu_showMenu('UltraWebMenu1', event); return false;"> <form id="form1" runat="server"> <div> <igsch:WebDayView ID="WebDayView1" runat="server" WebScheduleInfoID="WebScheduleInfo1"> <ClientEvents MouseDown="WebDayView1_MouseDown" Click="WebDayView1_Click" /> </igsch:WebDayView> </div> <igsch:WebScheduleInfo ID="WebScheduleInfo1" runat="server"> </igsch:WebScheduleInfo> <ignav:UltraWebMenu ID="UltraWebMenu1" runat="server" WebMenuTarget="PopupMenu"> <IslandStyle BackColor="LightGray" BorderStyle="Outset" BorderWidth="1px" Cursor="Default"> </IslandStyle> <HoverItemStyle BackColor="DarkBlue" Cursor="Default" ForeColor="White"> </HoverItemStyle> <Images> <SubMenuImage Url="ig_menuTri.gif" /> </Images> <ItemStyle Cursor="Default" /> <Items> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> <ignav:Item Text="Top Item"> <Items> <ignav:Item Text="Sub Menu Item"> </ignav:Item> <ignav:Item Text="Sub Menu Item"> </ignav:Item> </Items> </ignav:Item> </Items> <DisabledStyle Font-Names="MS Sans Serif" Font-Size="8pt" ForeColor="Gray"> </DisabledStyle> <Levels> <ignav:Level Index="0" /> </Levels> <SeparatorStyle BackgroundImage="ig_menuSep.gif" CssClass="SeparatorClass" CustomRules="background-repeat:repeat-x; " /><ExpandEffects ShadowColor="LightGray"></ExpandEffects> </ignav:UltraWebMenu> </form></body></html>
Thanks a lot matt for the solution, i had implemented tat!
Is there any option to open the appointment window instead of double clicking the webdayview, my scenario is i want to open the appointment window when user select 'New Appointment' from the popupmenu instead of double clicking the webdayview.
Thanks
--Vijayanand.
if you dont want the appointment dialog to open by a double click
then cancel the client-side event.
for the monthview the code would be:
function WebMonthView1_DblClick(oMonthView, oEvent, element){ //Add code to handle your event here. oEvent.cancel = true;}
Here is some code to open a addappointment dialog:
Thanks matt for ur reply..
--vijayanand