I have a radgrid with one coulmn as DateTime. It has a date picker.
When adding a row to the grid how to make that DateTime field required?
I have the following code in ItenCreated event
Dim calb As Telerik.Web.UI.RadDatePicker = DirectCast(editItem(ColumnName).Controls(0), Telerik.Web.UI.RadDatePicker)
calb.ID = "DateValidated"
Dim rfvDt As New RequiredFieldValidator()
rfvDt.ID = "RequiredFieldValidator2"
rfvDt.ErrorMessage = " " + firstColumnName + " is Required "
rfvDt.ControlToValidate = "DateValidated"
editItem(ColumnName).Controls.Add(rfvDt)
It errors out.
protected void Page_Load(object sender, EventArgs e) {EBCRequest EBCRequest = new EBCRequest(); var dataSource = EBCRequest.GetValidEBCRequest((int)Region.DBB); if (dataSource.Count > 0) { this.RadScheduler2.DataSource = dataSource; this.RadScheduler2.DataBind(); foreach (RequestModel request in dataSource) { RadScheduler2.AppointmentDataBound +=
new AppointmentDataBoundEventHandler(RadScheduler2_AppointmentDataBound); } this.RadScheduler2.ReadOnly = true; this.RadScheduler2.Rebind(); } if (!IsPostBack) { this.lblUserName.Text = this.LoginUser.FullName; } } void RadScheduler2_AppointmentDataBound(object sender, SchedulerEventArgs e) { if (e.Appointment.Resources.GetResourceByType("EventType") != null) { switch (e.Appointment.Resources.GetResourceByType("EventType").Text) { case "Plant tour Catawba": e.Appointment.BackColor = System.Drawing.Color.Blue; break; case "Plant tour Claremont": e.Appointment.BackColor = System.Drawing.Color.Yellow; break; default: break; } } }
How can i go in RadScheduler2_AppointmentDataBound while debugging?
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" > <AjaxSettings > <telerik:AjaxSetting AjaxControlID="RadDockLayout1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadDockZone1" LoadingPanelID="RadDRadAjaxLoadingPanel1ockZone1" /> <telerik:AjaxUpdatedControl ControlID="rwinProperties" LoadingPanelID="RadDRadAjaxLoadingPanel1ockZone1" /> </UpdatedControls> </telerik:AjaxSetting> <telerik:AjaxSetting AjaxControlID="rwinProperties"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadDockZone1" LoadingPanelID="RadDRadAjaxLoadingPanel1ockZone1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManagerProxy><telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Black" /> <telerik:RadDockLayout ID="RadDockLayout1" runat="server" Skin="Default" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" OnLoadDockLayout="RadDockLayout1_LoadDockLayout" StoreLayoutInViewState="True"> <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="1400px" Width="1100px" Skin="Black" Orientation="Horizontal"> </telerik:RadDockZone> </telerik:RadDockLayout> <asp:Label id="lbCurrentProperty" runat="server" visible="false" /> <telerik:RadWindowManager ID="RadWindowManager1" runat="server"> <Windows> <telerik:RadWindow ID="rwinProperties" runat="server" Title="Select Properties" Height="550px" Width="450px" Left="150px" ReloadOnShow="false" VisibleOnPageLoad="false" ShowContentDuringLoad="false" CssClass="RadWindow" Modal="true"> </telerik:RadWindow> </Windows> </telerik:RadWindowManager>Dim URL As String = "SelectProperties.aspx?SectionID=" + SectionID + "&SectionCount=" + SectionCount + "&SectionName=" + SectionNameDim script As String = "function f(){radopen(""" + URL + """,""rwinProperties"").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", Script, True)Sub DisplayProperties(ByVal SectionID As String, SectionCount As String, ByVal SectionName As String) Dim script As String = "Sys.Application.add_load(ShowSelectProperties(""" & SectionID & """,""" & SectionCount & """,""" & SectionName & """));" ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", Script, True)End Subfunction ShowSelectProperties(SectionID, SectionCount, SectionName) { radopen("SelectProperties.aspx?SectionID=" + SectionID + "&SectionCount=" + SectionCount + "&SectionName=" + SectionName, "rwinProperties");}Protected Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemDataBound If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) Dim nActualQty As RadNumericTextBox = TryCast(item.FindControl("nActualQty"), RadNumericTextBox) Dim nActualAmount As RadNumericTextBox = TryCast(item.FindControl("nActualAmount"), RadNumericTextBox) ' This injects a javascript function to do the automatic line calculations nActualQty.Attributes.Add("onblur", "calculateLine('" & DataBinder.Eval(e.Item.DataItem, "Is_CPM") & "','" & DataBinder.Eval(e.Item.DataItem, "Rate") & "','" & nActualQty.ClientID & "','" & nActualAmount.ClientID & "')") End IfEnd Subfunction calculateLine(cpm, rate, quantity, totalAmount) { var q = parseFloat($find(quantity).get_value()); // This is the WRONG / OLD value var q = parseFloat($find(quantity).get_textBoxValue()); // This is now the right value ?! var t = $find(totalAmount); if (cpm == 'Y') { rate = parseFloat(rate) / 1000; } console.log('rate(' + rate + ') * q(' + q + ')'); t.set_value(rate * q);}I probably miss some fundamentals.
1.On delete event the flow goes to AppointmentCreated event and then twice hit AppointmentDelete Event
On AppointmentInsert event the flow hits twice too and this create 2 records in the database
2. I show the same timeslotcontext menu on right and left mouse click. On the right mouse click
OnClientAppointmentInserting is working properly. On the left mouse click
OnClientAppointmentInserting gives me the error message right after
timeSlotClick event before timeSlotContextMenuItemClicking and OnClientAppointmentInserting
event, so , please advise how to handle this.
3. I have CSS issues in the AdvanceInsert or Edit form: all my dropdowns do not show the arrow and scrolls, Recurrence editor does not show spin images
I created 3 support tickets 658678, 659352, 659845. I am doing proof project for the Radscheduler
Thank you for your help
My attachments in the ticket 659352
Thank you for your help
