Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
251 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
47 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
37 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
67 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
112 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
68 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
60 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
60 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
247 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
249 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?