Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
167 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
108 views

Hi-

 

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

 

Thanks

-Thomas

Rumen
Telerik team
 answered on 30 Sep 2024
1 answer
136 views

Please have a look at the following demo https://demos.telerik.com/aspnet-ajax/grid/examples/functionality/scrolling/scrolling/defaultcs.aspx?skin=Sunset

I have a similar scenario of a  page with a grid that also has a FormDecorator whose DecoratedControls property is set to All, yet the scrollbars in the grid on this page are not getting styled according to the Sunset theme. If I look at the FormDecorator theming demo at https://demos.telerik.com/aspnet-ajax/formdecorator/examples/overview/defaultcs.aspx then I can see that the scrollbars are being styled by the FormDecorator for the Sunset theme, but I don't see it for the grid scrollbars in my page even though the grid theme is set to Sunset.

 

<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" 
DecoratedControls="All" EnableViewState="true" 
ViewStateMode="Disabled" ControlsToSkip="None" EnableAjaxSkinRendering="true" />

When I see the html tag in Chrome's DevTools > Elements, I see the rfdScrollBars class is there as in code below, yet its not getting applied to the grid.

<html xmlns="http://www.w3.org/1999/xhtml" 
class="t-chrome t-chrome129 t-chrome t-chrome129 k-webkit k-webkit129 
RadForm RadForm_Sunset rfdButton rfdScrollBars rfdZone rfdLabel
rfdTextbox rfdTextarea rfdFieldset rfdRadio
 rfdCheckbox rfdGrids rfdRoundedCorners" style="">

Rumen
Telerik team
 answered on 26 Sep 2024
2 answers
106 views

I have an aspx page that has a user control with an id of MainMenu. This page also has a form decorator, which is decorating the elements in MainMenu user control.

Is it possible to exclude the user control MainMenu from having form decorator classes being applied to it? If yes, then how would I do it?


<telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" RenderMode="Auto"  EnableAjaxSkinRendering="False"/>
<uc1:MainMenu runat="server" ID="MainMenu"/>

Rumen
Telerik team
 answered on 26 Sep 2024
2 answers
307 views

Hi,

I have the following grid:


<TELERIK:RADGRID ID="RadGridProductCharacteristics" runat="server" AutoGenerateColumns="false" AllowAutomaticUpdates="true" OnItemUpdated="RadGridProductCharacteristics_ItemUpdated" OnItemDataBound="RadGridProductCharacteristics_ItemDataBound" OnItemCommand="RadGridProductCharacteristics_ItemCommand" OnPreRender="RadGridProductCharacteristics_PreRender">
	<CLIENTSETTINGS AllowGroupExpandCollapse="true" />
	<MASTERTABLEVIEW DataKeyNames="CharacteristicID" GroupLoadMode="Client" CommandItemDisplay="Top" EditMode="Batch">
		<BATCHEDITINGSETTINGS EditType="Cell" />
		<GROUPBYEXPRESSIONS>
			<TELERIK:GRIDGROUPBYEXPRESSION>
				<GROUPBYFIELDS>
					<TELERIK:GRIDGROUPBYFIELD FieldName="ParentCharacteristicName" />
				</GROUPBYFIELDS>
				<SELECTFIELDS>
					<TELERIK:GRIDGROUPBYFIELD FieldName="ParentCharacteristicName" HeaderText="Parent Characteristic" />
				</SELECTFIELDS>
			</TELERIK:GRIDGROUPBYEXPRESSION>
		</GROUPBYEXPRESSIONS>
		<COLUMNS>
			<TELERIK:GRIDBOUNDCOLUMN HeaderText="Characteristic" DataField="CharacteristicName" ReadOnly="true" />
			<TELERIK:GRIDBOUNDCOLUMN UniqueName="CharacteristicValue" HeaderText="Value" DataField="CharacteristicValue" />
			<TELERIK:GRIDTEMPLATECOLUMN HeaderText="Color" UniqueName="CharacteristicColor" DataField="CharacteristicColor">
				<ITEMTEMPLATE>
					<%# Eval("CharacteristicColor") %>
				</ITEMTEMPLATE>
				<EDITITEMTEMPLATE>
					<TELERIK:RADDROPDOWNLIST runat="server" ID="RadDropDownListColor" />
				</EDITITEMTEMPLATE>
			</TELERIK:GRIDTEMPLATECOLUMN>
			<TELERIK:GRIDBUTTONCOLUMN UniqueName="ImageButtonDelete" HeaderText="Action" ButtonType="ImageButton" ImageUrl="~/Resources/Images/icon_delete.png" CommandName="Delete" />
		</COLUMNS>
	</MASTERTABLEVIEW>
</TELERIK:RADGRID>

I would like to fill the RadDropDownListColor so it is filled when the user clicks the cell to edit the value.

I checked this article: Column Editors and from there I derived the following code:


protected void RadGridProductCharacteristics_PreRender(object sender, EventArgs e)
{
	GridTableView masterTable = (sender as RadGrid).MasterTableView;
	RadDropDownList radDropDownListColor = masterTable.GetBatchColumnEditor("CharacteristicColor") as RadDropDownList;

	radDropDownListColor.DataSource = DBCom.GetHTMLColors();
	radDropDownListColor.DataTextField = "HTMLColorName";
	radDropDownListColor.DataValueField = "HTMLColorCode";
	radDropDownListColor.DataBind();
	radDropDownListColor.Items.Insert(0, new DropDownListItem("", "0"));
}

But still the variable radDropDownListColor is null.

What am I doing wrong?

Rumen
Telerik team
 answered on 26 Sep 2024
1 answer
276 views

I'm having trouble binding values to a DropDownList inside an ItemTemplate in Batch Edit Mode, I tried looking for the control in RadGrid1_PreRender but it returns a null value, I can't use an SQL Data Source because I'm getting the values for the DDL from a WebService, I'd really appreciate some help with this problem, you can find my code below:

<p>public partial class Transform : System.Web.UI.Page     {
        public static CDEC.Interfaz.Instalacion.Contexto.ExcelInfo interfaz = new CDEC.Interfaz.Instalacion.Contexto.ExcelInfo();
        public static object[,] lista = interfaz.Contexto_EmpresaGrupo(179);
  
        protected void Page_Load(object sender, EventArgs e)
        {
  
        }
  
        protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            var lista2D = new ExcelInfo(0, 0).OBT_Transformadores_2D();
            this.RadGrid1.DataSource = lista2D;
        }
  
        protected void cbxPropietarioID_PreRender(object sender, EventArgs e)
        {
            //Doesn't seem to work             RadComboBox dropDownList = (RadComboBox)RadGrid1.FindControl("cbxPropietarioID");
        }
  
        protected void RadGrid1_PreRender(object sender, EventArgs e)
        {
            GridTableView masterTable = (sender as RadGrid).MasterTableView;
  
            //This returns a null             RadDropDownList categoryEditor = masterTable.GetBatchColumnEditor("ID_Propietario") as RadDropDownList;
        }
  
  
    }</p><p></p>
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Transform.aspx.cs" Inherits="InfoTec.Instalacion.Transform" %><%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server"></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">     <br />     
    <link href="styles.css" rel="stylesheet" />     <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" 
        onneeddatasource="RadGrid1_NeedDataSource" PageSize="15" Skin="Simple" 
        onitemdatabound="RadGrid1_ItemDataBound" AllowMultiRowEdit="True" 
        RenderMode="Lightweight" ShowFooter="True" 
        onprerender="RadGrid1_PreRender">         <GroupingSettings CollapseAllTooltip="Collapse all groups"></GroupingSettings>         <ExportSettings>             <Pdf PageWidth="">             </Pdf>         </ExportSettings>         <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ID_Trafo_2D" EditMode="Batch">             <CommandItemSettings ShowExportToExcelButton="True" 
                ShowExportToWordButton="True" ShowCancelChangesButton="True" 
                ShowSaveChangesButton="True" />             <Columns>                 <telerik:GridBoundColumn DataField="ID_2D" 
                    FilterControlAltText="Filter column column" HeaderText="2D ID" 
                    UniqueName="column" ReadOnly="True">                     <ItemStyle Width="60px" Wrap="True" />                 </telerik:GridBoundColumn>                 <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" 
                    HeaderText="Propietario ID" UniqueName="ID_Propietario" DataField="ID_Propietario">                     <EditItemTemplate>                         <telerik:RadDropDownList ID="ddlPropietarioID" runat="server" 
                            DataTextField="NombrePropietario" DataValueField="ID_Propietario">                         </telerik:RadDropDownList>                     </EditItemTemplate>                     <ItemTemplate>                         <%# Eval("NombrePropietario")%>                     </ItemTemplate>                     <HeaderStyle BackColor="Yellow" />                     <ItemStyle Wrap="False" />                 </telerik:GridTemplateColumn>             </Columns>         </MasterTableView>         <PagerStyle PageSizes="15;30;90" /> 
        <FilterMenu RenderMode="Lightweight"></FilterMenu
        <HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>     </telerik:RadGrid>     <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">     </telerik:RadScriptManager></asp:Content>
Rumen
Telerik team
 answered on 26 Sep 2024
2 answers
2.0K+ views

On my OWASP ZAP scans of our app (which uses asp.ajax controls 2021.3), I get the following warning (see below).

Could you please advise whether there's any plans to update the embedded jquery library to the latest?

 

Medium (Medium)Vulnerable JS Library
Description

The identified library jquery, version 1.12.4 is vulnerable.

URLhttps://test.xxxxx.com/Telerik.Web.UI.WebResource.axd?_TSM_CombinedScripts_=%3B%3BSystem.Web.Extensions%2C%20Version%3D4.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D31bf3856ad364e35%3Aen-GB%3Aba1d5018-bf9d-4762-82f6-06087a49b5f6%3Aea597d4b%3Ab25378d2%3BTelerik.Web.UI%2C%20Version%3D2021.3.914.45%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3D121fae78165ba3d4%3Aen-GB%3Abd4f5d20-e2f4-41b1-99ef-02ee4a064af0%3A16e4e7cd%3Af7645509%3Aed16cbdc%3A88144a7a%3A33715776%3A24ee1bba%3A6d43f6d9%3Ac128760b%3A874f8ea2%3A19620875%3Ac172ae1e%3Af46195d3%3A9cdfc6e7%3Ae330518b%3A2003d0b8%3A1e771326%3Ac8618e41%3Ae4f8f289%3A1a73651d%3A16d8629e&_TSM_HiddenField_=RadScriptManager1_TSM&compress=1
MethodGET
Evidence/*! jQuery v1.12.4
Instances1
Solution

Please upgrade to the latest version of jquery.

Other information

CVE-2020-11023

CVE-2020-11022

CVE-2015-9251

CVE-2019-11358

Reference

https://github.com/jquery/jquery/issues/2432

http://blog.jquery.com/2016/01/08/jquery-2-2-and-1-12-released/

http://research.insecurelabs.org/jquery/test/

https://blog.jquery.com/2019/04/10/jquery-3-4-0-released/

https://nvd.nist.gov/vuln/detail/CVE-2019-11358

https://nvd.nist.gov/vuln/detail/CVE-2015-9251

https://github.com/jquery/jquery/commit/753d591aea698e57d6db58c9f722cd0808619b1b

https://bugs.jquery.com/ticket/11974

https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/

CWE Id829
Source ID3

 

Rumen
Telerik team
 answered on 24 Sep 2024
1 answer
152 views

For RadGrid, after setting EnableKeyboardShortcuts to false, I find the Up/Down keys are also disabled. However, according to your online document below, the Up/Down keys shouldn't be disabled in this case. Do you have the issue?

 

"To enable this feature you have to set the ClientSettings -> AllowKeyboardNavigation property of the grid to true (it's default value is false). The grid also features an additional property ClientSettings -> KeyboardNavigationSettings -> EnableKeyboardShortcuts which when set to false will disable all keyboard navigation shortcuts except for the Up/Down and Page Up]/Page Down keys. This is done with a view to facilitating the developer if he intends to implement his own scenario if the above-listed keys (with the exceptions mentioned) have been pressed."

Attila Antal
Telerik team
 answered on 18 Sep 2024
1 answer
103 views

I think I've found a bug in the Grid when in batch edit mode. I have created a following grid;


        <telerik:RadGrid ID="grdFees" runat="server" AutoGenerateColumns="False" GridLines="None"
            AllowSorting="False"  Height="310px"
            OnNeedDataSource="grdFees_NeedDataSource"
            OnPreRender="grdFees_PreRender" 
            OnItemDataBound="grdFees_ItemDataBound">
        <MasterTableView CellPadding="4" CommandItemDisplay="Top" EditMode="Batch" DataKeyNames="FeeTypeId, CurrencyCode, ShowCurrencyCode, Paid" ClientDataKeyNames="Paid,ShowCurrencyCode">
            <CommandItemSettings ShowExportToWordButton="false" ShowExportToExcelButton="false"
                ShowExportToCsvButton="false" ShowExportToPdfButton="false" ShowRefreshButton="false"
                ShowAddNewRecordButton="false" />
            <BatchEditingSettings EditType="Row" HighlightDeletedRows="true" OpenEditingEvent="Click" />
            <Columns>
                <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderStyle-Width="100px" ReadOnly="True" />

                <telerik:GridNumericColumn UniqueName="Amount" DataField="Amount" HeaderStyle-Width="70px" HeaderText="Amount" DecimalDigits="3"  />

                <telerik:GridTemplateColumn UniqueName="CurrencyCode" DataField="CurrencyCode" HeaderText="Currency Code" DefaultInsertValue="GBP" HeaderStyle-Width="60px">
                    <ItemTemplate>
                        <%# Eval("CurrencyCode") %>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox RenderMode="Lightweight" runat="server" ID="CurrencyCodeDropDown" DataValueField="CurrencyCode"
                            DataTextField="CurrencyCode" MarkFirstMatch="true" AllowCustomText="true" >
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                </telerik:GridTemplateColumn>

                <telerik:GridCheckBoxColumn UniqueName="Paid" DataField="Paid" HeaderStyle-Width="20px" HeaderText="Paid" SortExpression="Paid" ReadOnly="true" />

                <telerik:GridBoundColumn UniqueName="PaidDate" DataField="PaidDate" HeaderText="Paid Date" HeaderStyle-Width="100px" ReadOnly="True" 
                    DataFormatString="{0:yyyy-MM-dd HH:mm:ss}" />
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
            <ClientEvents OnBatchEditOpening="onBatchEditOpening" />
        </ClientSettings>
    </telerik:RadGrid>

with the javascript;


        function onBatchEditOpening(sender, args)
        {
            var row = args.get_row();
            var grid = $find("<%=grdFees.ClientID %>");
            var masterTable = grid.get_masterTableView();
            var rows = masterTable.get_dataItems();

            var isPaid = rows[row.sectionRowIndex].getDataKeyValue("Paid");

            if (isPaid === "True")
            {
                // prevent any editing on paid fees
                args.set_cancel("true");
                return;
            }

            var showCC = rows[row.sectionRowIndex].getDataKeyValue("ShowCurrencyCode");
            if (showCC === "False" && args.get_columnUniqueName() == "CurrencyCode")
            {
                // do not show Currency Code drop down menu
                args.set_cancel("true");
            }
   
        }

I want to prevent the RadComboBox from appearing if a value in the dataset is false. The good news is that it works. The bad news is after clicking on a row where showCC is false, the rest of the grid becomes unresponsive.

The grid comes back to life after clicking on Cancel Changes.

Is this a bug?

Vasko
Telerik team
 answered on 16 Sep 2024
1 answer
102 views

Hi Telerik Team,

I have an appointment with start time as 11 Sep 24 11:00 PM and ends at 12 Sep 24 3:00 AM ( tooltip shows the correct start time and end time supplied). The start time displays wrongly with a right arrow. Also it varies as the resolution changes. Please find the below images. 

 

Please provide a resolution for the issue. I need to show the start time as 11 PM and should not change while resolution change.

NOTE:  It displays the End time correctly even with different resolutions.

Thanks

Sathyendranath

 

Sathyendranath
Top achievements
Rank 1
Iron
Iron
 answered on 12 Sep 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?