Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
53 views

Created js function to edit cells using OnBatchEditClosed and  OnBatchEditOpened. The cells appear to "update" fine in terms of numbers and get a little red icon on cell. Yet whenever click save or attempt to edit a second cell get an error that can't read null properties on getElementsByTagName. 

Basically anything that involves GridBatchEditing again seems to cause an issue. How to resolve?


 //new Object()
        class Step4Rec {
            constructor() {
                this.monthForecast_PreviousVal = "";
                this.safetyStock_PreviousVal = 0;
                this.qtyPlanned_PreviouisVal = 0
            }
        };

        var step4OriginalData = new Array();

        //var DatesStartToEnd = new Array();
        var dateHelp = "T00:00:00";//adding z at end means UTC/Greenwich

        
        const DatesToProcessRec = {
            processingDate : new Date()
            , theYear : 2024 
            , theMonthNotZeroBased : 1
            , theMonthZeroBased : 0
            , theDay : 1
        };


        //OnBatchEditClosed="Step4PlanningEditsClosed" OnBatchEditOpened="Step4PlanningItemOpened" 
        function Step4PlanningEditsClosed(sender, args) {
            
            let grid = sender;
            let masterTableView = grid.get_masterTableView();
            let dataItems = masterTableView.get_dataItems();

            let todayDate = new Date();
            let modMonth = todayDate.getMonth();
            let modDay = 1;
            let modYear = todayDate.getYear();

            try {
                for (var i = 0; i < dataItems.length; i++) {
                    let monthForecast = dataItems[i].get_cell("MonthForecast").innerText;
                    let safetyStock = parseInt(dataItems[i].get_cell("SafetyStock").innerText);
                    let qtyPlanned = parseInt(dataItems[i].get_cell("QtyPlanned").innerText);

                    if (i < dataItems.length - 3)
                        safetyStock = 2;    
                    else
                        safetyStock = 0;
                
                    if (safetyStock > 0) {

                        let getCurrentMthRecord = monthForecast.split("/");
                        let theYear = getCurrentMthRecord[1];
                        let theMonth = MonthConversion(getCurrentMthRecord[0]);
                        let theCurrentMthRecordDate = new DateConversion(theMonth, theYear);

                        let revert = false;

                        for (let j = 1; j <= safetyStock && safetyStock != 0 && revert == false; j++) {
                            //last month can't have a stock value other then 0 as there are no more records
                            if (j + i < dataItems.length - 1) {
                                let expectedMonth = new Date(theCurrentMthRecordDate.setMonth(theCurrentMthRecordDate.getMonth() + 1));

                                let nextMonthForecast = dataItems[i+j].get_cell("MonthForecast").innerText;
                                let getNextMthRecord = nextMonthForecast.split("/");
                                let theNextYearOfRec = getNextMthRecord[1];
                                let theNextMonthOfRec = MonthConversion(getNextMthRecord[0]);
                                theNextRecordMthRecordDate = new DateConversion(theNextMonthOfRec, theNextYearOfRec);

                                //console.log(theNextRecordMthRecordDate.toString() + "|" + expectedMonth.toString());
                                if (theNextRecordMthRecordDate.getTime() === expectedMonth.getTime()) {
                                    let safetyStockToAdd = parseInt(dataItems[j + i].get_cell("QtyPlanned").innerText);
                                    qtyPlanned += safetyStockToAdd;
                                }
                                else {
                                    revert = true;
                                }
                            }
                            else {
                                revert = true;
                            }                                                          
                        }

                        if (revert == true) {

                            for (let k = 0; k < step4OriginalData.length; k++) {
                                //console.log(dataItems[k].get_cell("MonthForecast").innerText .toString() + " | " + step4OriginalData[k].monthForecast.toString())
                                if (dataItems[k].get_cell("MonthForecast").innerText == step4OriginalData[k].monthForecast) {
                                    dataItems[k].get_cell("SafetyStock").innerText = step4OriginalData[k].safetyStock.toString();
                                    dataItems[k].get_cell("QtyPlanned").innerText = step4OriginalData[k].qtyPlanned.toString();
                                }                                    
                            }

                            throw new Error("Invalid number of safety stock months specified. If safety stock months is greater then 0, please be sure following months are included in previous forecast steps.");
                            //alert("Invalid number of safety stock months specified. If safety stock months is greater then 0, please be sure following months are included in previous forecast steps.");
                        }

                        dataItems[i].get_cell("QtyPlanned").innerText = qtyPlanned;       
                    }//end if
                        //else it should be 0 or less (technically only 0) and just keep the number that is in the box that was sent on close
                }//end for
                console.log("before save changes call");
                //saveChangesToGrid();
                //console.log("after save changes call");
            } catch (error) {
                console.log(error.toString());
                alert(error.toString());
            }
        }// end function

        function DateConversion(month, year) {      
            //console.log("month: " + month.toString() + " | year: " + year.toString());
            return new Date(year.toString() + "-" + ("0" + month.toString()).slice(-2) + "-01"  + dateHelp);
        }

        function MonthConversion(str3LtrMonth) {

            switch (str3LtrMonth.toLowerCase()) {
                case "jan": return 1;
                case "feb": return 2;
                case "mar": return 3;
                case "apr": return 4;
                case "may": return 5;
                case "jun": return 6;
                case "jul": return 7;
                case "aug": return 8;
                case "sep": return 9;
                case "oct": return 10;
                case "nov": return 11;
                case "dec": return 12;
                default: throw new Error("month value not found");
            }
        }

        
        function Step4PlanningItemOpened(sender, args) {
            step4OriginalData.length = 0;

            let grid = sender;
            let masterTableView = grid.get_masterTableView();
            let dataItems = masterTableView.get_dataItems();

            let itemCellQtyPlanned = args.get_cell("QtyPlanned");
            let itemCellValue = sender.get_batchEditingManager().getCellValue(itemCellQtyPlanned);

            let rowItem = args.get_row();
            //assuming monthfrecast is in column 1 (first column)
            let itemCellMonthForecast = rowItem.children[0].innerText.toString();
               
            //console.log("::setup::");

            for (let i = 0; i < dataItems.length; i++) {
                let recordStep4 = new Step4Rec();
                
                recordStep4.monthForecast = dataItems[i].get_cell("MonthForecast").innerText;
                recordStep4.safetyStock = dataItems[i].get_cell("SafetyStock").innerText;
                recordStep4.qtyPlanned = dataItems[i].get_cell("QtyPlanned").innerText;

                //attempt to input missing data another way
                if ((recordStep4.qtyPlanned == undefined || recordStep4.qtyPlanned == "") && recordStep4.monthForecast.toString() == itemCellMonthForecast.toString() ) {
                    recordStep4.qtyPlanned = itemCellValue;
                }

                step4OriginalData.push(recordStep4); 
                //console.log(recordStep4.monthForecast.toString() + " | " + recordStep4.safetyStock.toString() + " | " + recordStep4.qtyPlanned.toString());
            }

            /*
            console.log("::output::");
            for (var od = 0; od < step4OriginalData.length; od++) {
                console.log("od: " + od.toString());
                console.log(step4OriginalData[od].monthForecast.toString() + " | " + step4OriginalData[od].safetyStock.toString() + " | " + step4OriginalData[od].qtyPlanned.toString());
            }
            */
        }

 


<telerik:RadWizardStep 
                        ID="StepAggregateDemand" 
                        Title="4. Aggregate Demand" 
                        StepType="Step" 
                        Enabled="false" 
                        Active="false" 
                        runat="server">
                        <telerik:RadAjaxPanel ID="RadAjaxPanelAggregateDemand" runat="server" AsyncPostBackTimeout="20000"   LoadingPanelID="RadAjaxLoadingPanelAggregateDemand"> 
                        <div style="height:30px">
                            <span> 
                                <telerik:RadButton ID="RadButtonNextStepAggregateDemand" Skin="Default" Text="Next" CssClass="button_buttonNext" Width="80px" Height="22px" ToolTip="Click to see next destination"  runat="server" ButtonType="LinkButton" OnClientClicking="OnNextClicking"></telerik:RadButton>     
                                <telerik:RadButton ID="RadButtonPreviousStepAggregateDemand" Skin="Default" Text="Previous" CssClass="button_buttonPrevious" Width="80px" Height="22px" ToolTip="Click to see previous destination"  runat="server" ButtonType="LinkButton" OnClientClicking="OnPreviousClicking" ></telerik:RadButton>                                                    
                            </span>
                        </div>
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelAggregateDemand" AsyncPostBackTimeout="1200"  runat="server" Skin="Default" Modal="true" /> 
                            <telerik:RadGrid 
                                AutoGenerateColumns="false" 
                                ID="RadGridAggregateDemand" 
                                CssClass="CenterAll"  
                                RenderMode="Lightweight"  
                                AllowFilteringByColumn="false" 
                                AllowSorting="false" 
                                OnItemDataBound="RadGridAggregateDemand_ItemDataBound" 
                                OnItemCommand="RadGridAggregateDemand_ItemCommand"
                                ShowFooter="true" 
                                runat="server" 
                                PageSize="100" 
                                OnBatchEditCommand="RadGridAggregateDemand_BatchEditCommand">
                                <ExportSettings>
                                    <Excel Format="Xlsx"  />
                                </ExportSettings>
                                <GroupingSettings  CaseSensitive="false" />
                                <ClientSettings  EnableRowHoverStyle="false" AllowKeyboardNavigation="true" >
                                    <ClientEvents OnBatchEditClosed="Step4PlanningEditsClosed" OnBatchEditOpened="Step4PlanningItemOpened" /> 
                                </ClientSettings>
                                <MasterTableView 
                                    AutoGenerateColumns="false" 
                                    EditMode="Batch"   
                                    CommandItemDisplay="TopAndBottom" 
                                    DataKeyNames="MonthForecast" 
                                    Name="MonthForecast"   
                                    AllowFilteringByColumn="false" 
                                    ShowFooter="true" 
                                    AllowSorting="false">
                                    <BatchEditingSettings EditType="Cell" OpenEditingEvent="Click"  />
                                    <CommandItemSettings  
                                        ShowAddNewRecordButton="false"  
                                        ShowRefreshButton="false" 
                                        ShowCancelChangesButton="true"                                      
                                        ShowSaveChangesButton="false" 
                                        /> 
                                    <CommandItemTemplate>
	                                    <telerik:RadButton runat="server" ID="ResetButton" autopostback="false"  Text="Reset to Last Save" ToolTip="Reset to Last Save" style="float: right;" OnClientClicked="cancelChangesToGrid" Width="170px"><Icon PrimaryIconCssClass="rgIcon rgCancelIcon" /></telerik:RadButton>
	                                    <telerik:RadButton runat="server" ID="SaveChangesButton" AutoPostBack="false" Text="Save Changes" ToolTip="Save Changes" style="float: right;" OnClientClicked="saveChangesToGrid" Width="145px"><Icon PrimaryIconCssClass="rgIcon rgSaveIcon" /></telerik:RadButton>  
                                    </CommandItemTemplate>
                                    <Columns>
                                        <telerik:GridBoundColumn UniqueName="MonthForecast" DataField="MonthForecast"  HeaderText="MonthForecast" ReadOnly="true" HeaderTooltip=""></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PPPY_1Month" DataField="PPPY_1Month" HeaderText="PPPY_1Month" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="" Aggregate="Sum"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PPY_1Month" DataField="PPY_1Month" HeaderText="PPY_1Month" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip=""  Aggregate="Sum" ></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PY_1Month" DataField="PY_1Month" HeaderText="PY_1Month" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip=""  Aggregate="Sum" ></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Composite" DataField="Composite" HeaderText="Composite" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="This is the sum of the previous sales (from 12 months ago) of the Key Product Master and the Contributing Product Masters, based on the levels of contribution assigned in the Style Demand Composite."  Aggregate="Sum" ></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Months1Perc" DataField="Months1Perc" HeaderText="∆ 1 Month %" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="This measures the difference between the py 1 month (based on when this report is run) and the same 1 month 2 years ago. This is based on the Key Product Master and proportional contribution from the Contributing Product Masters."></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Months3Perc" DataField="Months3Perc" HeaderText="∆ 3 Months %" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="This measures the difference between the py 3 months (based on when this report is run) and the same 3 months 2 years ago. This is based on the Key Product Master and proportional contribution from the Contributing Product Masters."></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="Months6Perc" DataField="Months6Perc" HeaderText="∆ 6 Months %" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="This measures the difference between the py 6 months (based on when this report is run) and the same 6 months 2 years ago. This is based on the Key Product Master and proportional contribution from the Contributing Product Masters."></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PY_PPYPerc" DataField="PY_PPYPerc" HeaderText="∆ PY/PPY %" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="This measures the difference between 2 year and 3 years rolling."></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="MPPY_MPPPYPerc" DataField="MPPY_MPPPYPerc" HeaderText="∆ 3MPPY/3MPPPY %" ReadOnly="true" DataFormatString="{0:N0}" HeaderTooltip="This measures the difference between a 2 year ago 3 months and 3 years ago 3 months."></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="PlannedPerc" DataField="PlannedPerc" HeaderText="∆ Planned %" ReadOnly="false" DataFormatString="{0:N0}" HeaderTooltip="The suggested value that appears in this field is the stored value else based on ∆ 6 Months % (default min 0, default max 50)"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="SafetyStock" DataField="SafetyStock" HeaderText="Safety Stock %" ReadOnly="false" DataFormatString="{0:N0}" HeaderTooltip="Default to 10%"></telerik:GridBoundColumn>
                                        <telerik:GridBoundColumn UniqueName="QtyPlanned" DataField="QtyPlanned" HeaderText="Qty Planned" ReadOnly="false" DataFormatString="{0:N0}" HeaderTooltip="This Is the aggregate forecasted demand for this product master For Each month."  Aggregate="Sum" ></telerik:GridBoundColumn>
                                    </Columns>
                                </MasterTableView>
                            </telerik:RadGrid>
                        </telerik:RadAjaxPanel>   
                        <br />
                        <asp:ImageButton ID="ImgExcelOutputAggregateDemand" ImageAlign="Left" ImageUrl="images/excel-2010-icon.gif" OnClick="ExcelOutputAggregateDemand" runat="server" CssClass="ImageButtons" Visible="True" />
                        <br />  
</telerik:RadWizardStep>

Vasko
Telerik team
 answered on 21 Oct 2024
1 answer
51 views

Hi Team ,

I have set up a nested RadWindow, but the loading panel is not displaying. When I was using AjaxControlToolkit, everything functioned correctly, but after migrating to RadWindow, the loading panel is not working.

The loading panel operates correctly for the master RadWindow, and I have attached files that detail the nested RadWindows and the code-behind.

Could you please help me get the loading panel to work properly?

Vasko
Telerik team
 answered on 18 Oct 2024
1 answer
81 views

Hi all,

I can see support for Youtube and mp4 files, but can someone please confirm that videos hosted on Vimeo can be played using RadMediaPlayer?

Rumen
Telerik team
 answered on 09 Oct 2024
1 answer
183 views

I need to set the GridBound column to read-only when in edit mode but editable when in insert mode (New row added). I've attempted using the Code-Behind "ItemDataBound" event as well as Client-Side "OnBatchEditOpend" event to set the read-only property on the column. Neither attempt work as the column always allows text to be entered. Below are my code snippets:

Thank you in advance for any help you can provide.

Grid Markup:

<telerik:RadAjaxLoadingPanel ID="CatLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="CatPanel1" runat="server" LoadingPanelID="CatLoadingPanel1">
               <telerik:RadGrid ID="grdCategory" runat="server" AutoGenerateColumns="false" CssClass="Gridheight4" 
                  Width="100%" AllowPaging="true" PageSize="10">
                     <ClientSettings> 
                              <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                              <KeyboardNavigationSettings AllowSubmitOnEnter="true" />  
                              <ClientEvents OnBatchEditGetCellValue="GetCellValue" />
                               <ClientEvents OnBatchEditSetCellValue="SetCellValue" />
                                <ClientEvents OnBatchEditGetEditorValue="GetEditorValue" />
                                <ClientEvents OnBatchEditSetEditorValue="SetEditorValue" />
                                <ClientEvents OnBatchEditOpened="BatchEditOpened" />
                       </ClientSettings>
                      <MasterTableView DataKeyNames="Category" EditMode="Batch" HeaderStyle-Font-Size="8pt" 
                              HeaderStyle-Font-Bold="true" ItemStyle-Font-Size="8pt" PagerStyle-AlwaysVisible="true" 
                               CommandItemDisplay="Top" InsertItemDisplay="Top" BatchEditingSettings-EditType="Cell" 
                                BatchEditingSettings-OpenEditingEvent="Click">
                              <CommandItemSettings ShowSaveChangesButton="true" ShowCancelChangesButton="true" 
                                ShowRefreshButton="true"/>                                
                              <Columns>
                                  <telerik:GridBoundColumn DataField="Category" UniqueName="Category" HeaderText="Category" 
                                   DataType="System.String" ItemStyle-CssClass="maximize" HeaderStyle-Width="250px" ItemStyle- 
                                  Font-Size="8pt">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridTemplateColumn DataField="Is_Active" UniqueName="Is_Active"  HeaderText="Active" 
                                  HeaderStyle-Width="80px">
                                       <ItemTemplate>
                                            <telerik:RadSwitch runat="server" ID="CheckBox1" AutoPostBack="true" Enabled="false" 
                                            CssClass="elasticSwitch" Checked='<%# Eval("Is_Active") %>' OnClientClicking="checkbox1Click"> 
                                           </telerik:RadSwitch>
                                         </ItemTemplate>
                                         <EditItemTemplate>
                                               <telerik:RadSwitch runat="server" ID="CheckBox2" AutoPostBack="false" 
                                                 CssClass="elasticSwitch">
                                                </telerik:RadSwitch>
                                           </EditItemTemplate>
                                    </telerik:GridTemplateColumn>
                          <telerik:GridCheckBoxColumn DataField="CCD_Only" UniqueName="CCD_Only" HeaderText="CCD Only" 
                                 HeaderTooltip="Show for CCD UMs Only.." DataType="System.Boolean">
                            </telerik:GridCheckBoxColumn>
                            <telerik:GridCheckBoxColumn DataField="MMS_Only" UniqueName="MMS_Only" HeaderText="MMS Only" 
                                  HeaderTooltip="Medication Management UMs Only.."  DataType="System.Boolean"> 
                             </telerik:GridCheckBoxColumn>
                             <telerik:GridBoundColumn DataField="Comments" UniqueName="Comments" 
                                     HeaderText="Comments" DataType="System.String"></telerik:GridBoundColumn>
                         </Columns>
              </MasterTableView>
       </telerik:RadGrid>
</telerik:RadAjaxPanel>

Client Script

<script type="text/javascript">
        function GetCellValue(sender, args) {
            if (args.get_columnUniqueName() == "Is_Active") {
                args.set_cancel(true);
                var container = args.get_container();
                var displaySwitch = $telerik.findControl(container, "CheckBox1");
                if (displaySwitch) {
                    args.set_value(displaySwitch.get_checked());
                }
               
            }
        }
        function SetCellValue(sender, args) {
            if (args.get_columnUniqueName() == "Is_Active") {
                args.set_cancel(true);
                var container = args.get_container();
                var displaySwitch = $telerik.findControl(container, "CheckBox1");
                if (displaySwitch) {
                    displaySwitch.set_checked(args.get_value());
                }
            }
        }
        function GetEditorValue(sender, args) {
            if (args.get_columnUniqueName() == "Is_Active") {
                args.set_cancel(true);
                var container = args.get_container();
                var editorSwitch = $telerik.findControl(container, "CheckBox2");
                if (editorSwitch) {
                    args.set_value(editorSwitch.get_checked());
                }
            }
        }
        function SetEditorValue(sender, args) {
            if (args.get_columnUniqueName() == "Is_Active") {
                args.set_cancel(true);
                var container = args.get_container();
                var editorSwitch = $telerik.findControl(container, "CheckBox2");
                if (editorSwitch) {
                    editorSwitch.set_checked(args.get_value());
                }
            }
        }
        function BatchEditOpened(sender, args) {
            var tblView = args.get_tableView();
            var dataIem = tblView.get_dataItems();
            var item = args.get_row().control;
            var index = item.get_itemIndex();
            var colCategory = tblView.getColumnByUniqueName("Category");
            var colelement = colCategory.get_element();
            if (index < 0) {
                colelement.setAttribute("readonly", false);
            }
            else {
                colelement.setAttribute("readonly", true);
            }
        }
        function checkbox1Click(sender, args) {
            args.set_cancel(true);
            var grid = $find("<%= grdCategory.ClientID %>");
            var batchEditingManager = grid.get_batchEditingManager();
            var parentCell = $telerik.$(sender.get_element()).closest("td")[0];
            var initialValue = sender.get_checked();
            batchEditingManager.changeCellValue(parentCell, initialValue);
        }
    </script>

VB Code Behind

Private Sub grdCategory_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles grdCategory.ItemDataBound
        If TypeOf e.Item Is GridEditableItem Then
            If e.Item.IsInEditMode Then
                Dim itemIndex As Integer = e.Item.ItemIndex
                Dim CateGoryColumn As GridColumn = grdCategory.MasterTableView.GetColumn("Category")
                If itemIndex < 0 Then
                    CType(CateGoryColumn, GridEditableColumn).ReadOnly = False
                Else
                    CType(CateGoryColumn, GridEditableColumn).ReadOnly = False
                End If

            End If
        End If

    End Sub

Vasko
Telerik team
 answered on 09 Oct 2024
1 answer
292 views

Hi Everyone,

I need to display something (as spinner?) to indicate the application is running, because I have a process that forces the user to wait for 30-60 seconds. I think a spinner would be helpful. What I'm not sure is, how to accomplish this. Ironically, when loading this page, this webpage displays two circles each rotating/spinning in different directions. Something like that would be perfect.

How can I duplicate this in my ASP.NET AJAX project?

Essentially, the user presses the RADButton. So, I'd like to pop the spinners when the long process begins, and then hide it when the process is over. Is there a way to launch the spinner from within my C# function?

 

Thanks,

Mike


 

Rumen
Telerik team
 answered on 09 Oct 2024
1 answer
57 views
Does anyone know how to create a layered bar chart like the sample image I have included?  I do not want to stack the data because that misrepresents the Y axis value.  I am programming this chart for a sales pipeline.
Vasko
Telerik team
 answered on 07 Oct 2024
1 answer
40 views

Hi,

I have built a custom assembly skin, and I know that it is working correctly as the controls on the page are showing the correct skin.

However, if I am to add a simple control telerik raddatepicker like the below

protected void Page_Load(object sender, EventArgs e)
{
    RadDatePicker oDate = new RadDatePicker();
    oDate.Skin = "IWCL";
    pnlMain.Controls.Add(oDate);
}

The following error is thrown

Telerik.Web.UI.DatePickingInput with ID='dateInput' was unable to find an embedded skin with the name 'IWCL'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

I am pretty sure that there isn't any issue with the custom assembly, as without adding a control through a code behind, the page runs ok without any error.

You can reproduce the same error by using the sample project that telerik have provided in the below

https://docs.telerik.com/devtools/aspnet-ajax/styling/controlling-visual-appearance/how-to-load-skins-from-external-assemblies?_gl=1*p0oqmn*_gcl_au*MTU5OTE5Mjc3Mi4xNzIzMjIyMDU5*_ga*ODM2NTIzMjk2LjE3MjMyMjIwNTk.*_ga_9JSNBCSF54*MTcyNzgxODEwNC4yOS4xLjE3Mjc4MjIwNTUuNTAuMC4w

Thank you and I look forwards to hear from you

Vasko
Telerik team
 answered on 04 Oct 2024
1 answer
76 views

Hi Guys

How to validate the following in the RadScheduler

I have a Webform with the RadScheduler and in the Popup form I the following dropdown list that I would like to be mandatory, user must select an item in order to continue saving the scheduler.

private void getReasons(int pReasonId)
    {
        // Create a new DataTable.        
        DataTable dtReason = new DataTable("scheduler_reasons");
        DataColumn dtColumn;

        // Create id column
        dtColumn = new DataColumn();
        dtColumn.DataType = typeof(Int32);
        dtColumn.ColumnName = "ID";
        dtColumn.Caption = "Reason ID";
        dtColumn.ReadOnly = false;
        dtColumn.Unique = true;
        // Add column to the DataColumnCollection.
        dtReason.Columns.Add(dtColumn);

        // Create Name column.
        dtColumn = new DataColumn();
        dtColumn.DataType = typeof(String);
        dtColumn.ColumnName = "calendar_reason";
        dtColumn.Caption = "Calendar Reason";
        dtColumn.AutoIncrement = false;
        dtColumn.ReadOnly = false;
        dtColumn.Unique = false;
        /// Add column to the DataColumnCollection.
        dtReason.Columns.Add(dtColumn);
                
        // Make id column the primary key column.
        DataColumn[] PrimaryKeyColumns = new DataColumn[1];
        PrimaryKeyColumns[0] = dtReason.Columns["id"];
        dtReason.PrimaryKey = PrimaryKeyColumns;

        // Create a new DataSet
        DataSet dtSet = new DataSet();

        // Add custTable to the DataSet.
        dtSet.Tables.Add(dtReason);

        DataRow workRow = dtReason.NewRow();        
        workRow["ID"] = "1";
        workRow["calendar_reason"] = "Day Off";
        dtReason.Rows.Add(workRow);
        workRow = dtReason.NewRow();        
        workRow["ID"] = "2";
        workRow["calendar_reason"] = "Jury Duty";
        dtReason.Rows.Add(workRow);
        workRow = dtReason.NewRow();        
        workRow["ID"] = "3";
        workRow["calendar_reason"] = "Sick Day";
        dtReason.Rows.Add(workRow);
        workRow = dtReason.NewRow();        
        workRow["ID"] = "4";
        workRow["calendar_reason"] = "Vacation";
        dtReason.Rows.Add(workRow);

        //- Telerik Advanced Edit Form
        Telerik.Web.UI.ResourceType ResReasons = new Telerik.Web.UI.ResourceType("CaleReasons");
        //- Telerik Advanced Edit Form Dropdownlist
        ResReasons.DataSource = dtReason;
        ResReasons.ForeignKeyField = "reasonId";
        ResReasons.KeyField = "ID";
        ResReasons.Name = "Reason";
        ResReasons.TextField = "calendar_reason";
        RadScheduler1.ResourceTypes.Add(ResReasons);

    }

Thank you for your help

Al

Vasko
Telerik team
 answered on 03 Oct 2024
1 answer
123 views

DatePicker with Multiple Rows and or Multiple columns the Month View Title isn't honored until you navigate to the next or previous set of months and back, then the Month Year is shown.  Or if you click to show the months and select a date, then click to show the dates again, then the Year is shown.

This only seems to be an issue if viewing a single month.  

<telerik:RadDatePicker ID="DatePicker1" runat="server" Calendar-MultiViewColumns="3" Calendar-MultiViewRows="2" ShowPopupOnFocus="true"> </telerik:RadDatePicker>

Also applies if using a shared Calendar.

Workaround in prerender

For Each View In Me.rcCalendar.CalendarView.ChildViews
         CType(View, MonthView).TitleFormat = "MMMM yyyy"
Next View

Version Used: 2024.2.513.462

Vasko
Telerik team
 answered on 02 Oct 2024
1 answer
73 views

Hi-

 

Can you display the day of the month in a Day Template?

 

Thanks

-Thomas

Rumen
Telerik team
 answered on 30 Sep 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?