or
protected void gvNation_PreRender(object sender, EventArgs e) { if (!Page.IsPostBack) { gvNation.MasterTableView.IsItemInserted = true; gvNation.Rebind(); }
GridPagerItem pagerItem = (GridPagerItem)gvNation.MasterTableView.GetItems(GridItemType.Pager)[1];
GridCommandItem commandItem = (GridCommandItem)gvNation.MasterTableView.GetItems(GridItemType.CommandItem)[1];
GridCommandItem commandItem1 = (GridCommandItem)gvNation.MasterTableView.GetItems(GridItemType.CommandItem)[0];
if (gvNation.EditIndexes.Count > 0 || gvNation.MasterTableView.IsItemInserted)
{
pagerItem.Enabled = false;
commandItem.FindControl("PlaceHolder1").Visible = false;
Button btn = (Button)commandItem1.FindControl("btnAdd");
btn.Enabled = false;
Button btnR = (Button)commandItem1.FindControl("btnRefresh");
btnR.Enabled = false;
gvNation.AllowFilteringByColumn = false;
}
else
{
pagerItem.Enabled = true;
commandItem.FindControl("PlaceHolder1").Visible = true;
Button btn = (Button)commandItem1.FindControl("btnAdd");
btn.Enabled = true;
Button btnR = (Button)commandItem1.FindControl("btnRefresh");
btnR.Enabled = true;
gvNation.AllowFilteringByColumn = true;
} }
Hi,
I am trying to get the selected time range for a new appointment and am getting incorrect information passed into the OnClientAppointmentInserting method. As shown in the screen shot "appointment selection.jpg" I select a time period of 10:30 am to 12:30 pm, I then right click and select new appointment. When the OnClientAppointmentInserting method is fired the start time is now 12:00 pm and the end time is now 12:15 pm (see "timeslot.jpg").
Am I missing something or is this an issue with the OnClientAppointmentInserting event?
Thanks
Gavin.
Here is my code
<telerik:RadScheduler ID="rsAppointments" runat="server" DataEndField="AppointmentEndDate" DataKeyField="PatientAppointmentID" DataStartField="AppointmentStartDate" DataSubjectField="AppointmentTypeID" DataDescriptionField="AppointmentTypeID" Height="600px" MinutesPerRow="15" onnavigationcomplete="rsAppointments_NavigationComplete" OnClientAppointmentInserting="OnInsertAppointment" OnClientAppointmentEditing="OnEditAppointment" GroupBy="Clinicians" onappointmentcreated="rsAppointments_AppointmentCreated" onappointmentupdate="rsAppointments_AppointmentUpdate" onappointmentdelete="rsAppointments_AppointmentDelete"> <TimelineView UserSelectable="False" /> <ResourceTypes> <telerik:ResourceType Name="Clinicians" KeyField="UserID" TextField="ClinicianName" ForeignKeyField="ClinicianID" /> </ResourceTypes> <AppointmentTemplate> <table border="0" cellpadding="3" cellspacing="0" width="100%"> <tr> <td style="border: none;" rowspan="2"><asp:Literal ID="litContent" runat="server"></asp:Literal></td> </tr> </table> </AppointmentTemplate> <AppointmentContextMenuSettings EnableDefault="true" /> <TimeSlotContextMenuSettings EnableDefault="true" /> </telerik:RadScheduler>function OnInsertAppointment(sender, args) { var slot = args.get_targetSlot(); var dteStart = slot.get_startTime(); var dteEnd = slot.get_endTime(); var res = slot.get_resource(); var resourceID = res.get_key(); var oManager = GetRadWindowManager(); var oWnd = oManager.getWindowByName("rwAppointment"); var URL = "AppointmentEdit.aspx?mode=insert&start=" + dteStart.toString("dd/MM/yyyy HH:mm:ss tt") + "&end=" + dteEnd.toString("dd/MM/yyyy HH:mm:ss tt") + "&cID=" + resourceID + "&pid=" + <%= PatientID %>; oWnd.setUrl(URL); oWnd.show(); args.set_cancel(true); }

<telerik:RadMenuItem runat="server" IsSeparator="True" />We have declared onMouseover on the RadMenu.. this gets fired on all RadMenuItems. But i dont want this to be enabled on the Seperator items
oCheckbox.ID = "chk1"oCheckbox.AutoPostBack = TrueoCell.Controls.Add(oCheckbox)oRow.Cells.Add(oCell)oRadTextBox.ID = "txtSerial"oCell.Controls.Add(oRadTextBox)oRow.Cells.Add(oCell)oTable.Rows.Add(oRow)oAjaxManager.AjaxSettings.AddAjaxSetting(oCheckbox, oRadTextBox)