When I have users who wish to create a new appointment using a WebDayView control, I'd like for them to be able to set the start time by double-clicking on a specific time slot in the DayView (note, I'm using my own appointment dialog because the default one didn't work for my needs). Is there a way I can get which time slot the user selected to create a new activity?
Hi Sukasa,
you may be able to get the html element (time slot) that was double-clicked from DblClick client event. This event contains parameters oDayView (the DayView client-side object), oEvent (the event object, which allows you to cancel the event, cancel the postback, or request a postback), and element (the html element that correspondends to what was double-clicked).
Each time slot is a tablecell (td) that has unique uie value, for example for 12am. uie = "SLOT0". 12:30am, uie = "SLOT1" and so forth.
Regards,
Riana
Infragistics ASP.NET team
Hi, that seems like a very unreliable method - if at any time your code changes or the DOM structure of the WebDayView changes, such an approach would likely break. Is there no provided client function to get this, and if not, will there be in future?
Current logic related to uie attributes is not going to be changed in future. Below I wrote an example for you:<script type="text/javascript">function dayViewDblClick(oDayView, evt, elem){ var uie = elem ? elem.getAttribute('uie') : null; if(!uie || !(uie.indexOf('SLOT') != 0 || uie.indexOf('LABL') != 0)) return; var i = parseInt(uie.substring(4)); //if(uie.indexOf('LABL') == 0) // i *= oDayView._childSlots; alert('time:' + i * oDayView.getTimeSlotInterval() + ' minutes'); //var time = 0; //if(i >= 0) // time += i * oDayView.getTimeSlotInterval() * 60000; //time += oDayView._days[day].time + oDayView._dayStart;}</script><igsch:WebDayView ID="WebDayView1" runat="server" WebScheduleInfoID="WebScheduleInfo1"> <ClientEvents DblClick="dayViewDblClick" /></igsch:WebDayView>
Hi I have WebDayView want to set the value like ...........
var sched = ig_getWebScheduleInfoById("ctl00_Main_WebPanel2_WebScheduleInfo1")
want to set the today date by default from javascript.......................
Hi Subhash,
To set active date in WebScheduleInfo on client, you may use member method setActiveDay(Date). Below is example:
<script type="text/javascript">function setDate() { //var date = new Date(2013, 1, 20); var date = new Date();//today //var sched = ig_getWebScheduleInfoById("ctl00_Main_WebPanel2_WebScheduleInfo1"); var sched = ig_getWebScheduleInfoById("<%=WebScheduleInfo1.ClientID%>"); //or //var sched = ig$("<%=WebScheduleInfo1.ClientID%>"); sched.setActiveDay(date);}</script><input type="button" value="setDate" onclick="setDate()" />
thanks done
Hi ,I m using ultrawebgrid in asp.net .........i am facing porblem like we have one ultrawebgrid and applying AllowSorting =True, in the ultrawebgrid we have multiple paging option let say we are in second page and applying sorting and we have also one button in ultrawebgrid ....in the button click we open one popup window from there we have one save button click on save button saving the popup value and reload the ultrawebgrid page .....after the reloading page index will be change and soting order will be change but we don't want to change the sorting order and don't want to change page order also ....................wnat to do all from javascript ......................Please help ..............................i have already spent much time but didn't find any solution...............................