Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
209 views
I have two web sites that in reality are two branches of the same project. However, in the newer one, I'm getting a RadWindow problem that wasn't originally there.

For instance, when comparing this one page in the two versions, every single row in every single involved file is the same (save a few removed commented rows). Furthermore, both sites' projects use the same versions of Telerik dll:s. And yet, in one of these sites, the title bar (including the border all around the window) does not show up.

I have read this guide: http://www.telerik.com/help/aspnet-ajax/window-troubleshooting-missing-borders-titlebar-and-commands.html and condluded the following:

  • This only happens in Chrome (well, on occasion it has happened in IE10 too, but I haven't been able to replicate that error).
  • EnableEmbeddedSkins is set to True
  • I get no error 500

How can I best start to debug this?

(As a bonus piece of information: RadWindows opened from within other RadWindows do not have this problem)
Richard
Top achievements
Rank 2
 answered on 18 Aug 2014
2 answers
305 views
I have a page that contains
- An AJAX panel that contains among other things, a few buttons.  These RadButtons have an OnClientClicked handler defined.
- RadWindows within a WindowManager.  The windows have ReloadOnShow and DestroyOnClose = true


When one of the windows is shown, there is a label, which I update the text based on the selected text of a dropdownlist on the main page.
However, when the window is shown, even through it correctly runs its OnLoad method, and APPEARS to have update the label text correctly, its NOT displayed on the label.

Suggestions?


BitShift
Top achievements
Rank 1
Veteran
 answered on 18 Aug 2014
1 answer
163 views
When the user selects a file in the RadAsyncUpload Control, instead of saving files to final destination on click of an Upload button, I want the files to be saved automatically on selection of the files. Some validations are made and then files are saved to final destination. I have seen examples where there is an Upload button which saves files to the final destination, but this is not what I want. Please let me know how to do this.
Princy
Top achievements
Rank 2
 answered on 18 Aug 2014
3 answers
368 views
Hello,

I am working on a project with a RadGrid.

In the Grid I have a column with a Timespan, But it seems that the Grid  no support that kind of type.
Is it?

Its displays this message:
No applicable method 'ToTimeSpan' exists in type 'Convert'

See video.

I’ll be glad to get a solution.

Thank you,
Daniel.
Viktor Tachev
Telerik team
 answered on 18 Aug 2014
8 answers
636 views
Hello,

I'd like to use the RadAutoCompleteBox without specifying a data source or data source id. Instead I want to allow the user to add custom entries. When entering any custom text I get the alert message "The control DataSource(or DataSourceID) is not set.".

How can I avoid this alert?

I found a thread about this topic, but it couldn't solve my issue: http://www.telerik.com/forums/autocomplete-with-no-database

Pleas help! Thank you very much in advance.

Roland
LGFox
Top achievements
Rank 1
 answered on 18 Aug 2014
5 answers
435 views
We are trying to use the imagegallery, with a data source that returns a sequence of binary images from a data source. THe first image shows correctly, but when it attempts to move to the next image the loading icon appears and nothing happens. Here's the code. We've also tried it with a js function to play the slideshow, but the problem appears whether the slideshow plays automatically or not.

Any suggestions as to what we are doing wrong?

<telerik:RadImageGallery ID="RadImageGallery1" runat="server" Width="100%" Height="310px"
           LoopItems="True" RenderMode="Auto" DataImageField="ImageFile"
           DataSourceID="dsRotationImages" DataTitleField="ImageDescription">
           <ThumbnailsAreaSettings Position="Bottom" ScrollOrientation="Horizontal" Mode="ImageSlider" />
           <ToolbarSettings ShowSlideshowButton="True" ItemsCounterFormat="Image {0} / {1}"
                
               ExitFullScreenButtonText="Exit" />
           <ClientSettings>
               <AnimationSettings SlideshowSlideDuration="3700">
                   <NextImagesAnimation Type="Blocks" Easing="EaseOutSine" Speed="2000" />
                   <PrevImagesAnimation Type="Blocks" Easing="EaseOutSine" Speed="2000" />
               </AnimationSettings>
               <ClientEvents OnImageGalleryCreated="ImageGalleryCreated" />
           </ClientSettings>
       </telerik:RadImageGallery>
Konstantin Dikov
Telerik team
 answered on 18 Aug 2014
2 answers
315 views
Do all Rad controls have their own separate OnLoad method?  I dont see it listed in the docs
http://www.telerik.com/help/aspnet-ajax/ajax-overview.html

I had a need for several popup windows to capture information.  I had originally started out building separate pages for these windows, but then discovered the content template.  I ran into issues with some databound controls not being loaded and since I was using AJAX, I started reading about all the issues others are having getting that to work.  However, all I had to do was use the controls OnLoad method and populate my controls there.  

My setup
I have a tree control that loads an ajax panel.  Within the panel are a few buttons that launch radwindows.  No big deal I thought.  The one issue I couldnt see how to do was populate some of the controls on the popup, such as a dropdownlist.  Doing it in the main page_load didnt work and I didnt want to load everything like this.  I didnt see anything in the documentation that mentions any individual OnLoad methods, but I suppose its documented somewhere else?  It works and does what I need, but is this discussed anywhere?
Marin Bratanov
Telerik team
 answered on 18 Aug 2014
11 answers
1.1K+ views
Hi Team,

I'm trying to export my grid to excel and to set some number formats I've attached a handler to ExportCellFormatting event. This used to work when I was using telerik UI dll with version 2012.1.215.35.

Recently, I upgraded my telerik UI to version 2014.2.618.35 and after this the ExportCellFormatting event does not get fired. Please suggest.

Thanks
Daniel
Telerik team
 answered on 18 Aug 2014
1 answer
536 views
Hi,
 
I am new to .Net programming and trying to impliment RadPivotGrid to develop a report.
 
There is no issue with RadPivotGrid implimentation. But, having difficulties in accessing Row and Column Group values.
 
As shown in Code behind, I am looking for corresponding sic_2_code and effective_year value for selected data cell.
 
<Fields>
                <telerik:PivotGridRowField DataField="sic_2_code" Caption="SIC Group" ZoneIndex="0">
                </telerik:PivotGridRowField>
                <telerik:PivotGridColumnField DataField="effective_year" Caption="Year" ShowGroupsWhenNoData="false">
                </telerik:PivotGridColumnField>
                <telerik:PivotGridAggregateField DataField="Proposed Premium" DataFormatString="{0:$#,##0}">
                    <CellTemplate>
                        <asp:LinkButton ID="LB_ProposedPremium" runat="server" OnClick="LB_ProposedPremium_Click">
            <%# string.Format("{0:$#,##0}", Container.DataItem)%>
                        </asp:LinkButton>
                    </CellTemplate>
                </telerik:PivotGridAggregateField>
</Fields>
 
Code Behind

protected void LB_ProposedPremium_Click(Object sender, EventArgs e)
    {
       
        string sBusinessSegment = string.Join(",", RCB_BusinessSegment.CheckedItems.Select(x => x.Value).ToArray());
     
//I need values of sic_2_code and effective_year to pass to another page
 
string sSICCode =??
string sEffectiveYear =??
 
 
        StringBuilder sb = new StringBuilder();
        sb.Append("NB_YearToYearSales.aspx");
        sb.Append("?SegmentID=" + sBusinessSegment);
sb.Append("&SICCode=" + sSICCode);
sb.Append("&EffectiveYear =" + sEffectiveYear);
        Response.Redirect(sb.ToString());
    }
Radoslav
Telerik team
 answered on 18 Aug 2014
2 answers
174 views
First of all, some things are working correctly.  See the attached screenshot.  You'll note that there is no option to insert and no option to delete.  Also if you go to edit 2 of the three columns are blanked out.   And importantly, the grid is working with our master page which took substantial modification of the automatically created grid's aspx markup (not referring to the code behind) and by automatic grid I mean the one that is created by right clicking in visual studio and choosing a RadGrid with CRUD.

I have also included the aspx file and code behind.  If you look in the code behind it includes the class from the code from the CRUD example on the telerik website (http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/automatic-crud-operations/defaultcs.aspx).  The reason a line is commented out is because uncommenting it  produced a 'does not exist in current context error' regarding radgrid 1.

The other (partial) codebehind class is inherited from another developer who made a similar form in a different part of the application in case it helps.

The question I have is what needs to be done to make the grid save?   Do I have to change an option?  Do I have to modify the C# code?   The more specific the answer, the better.  The answers in my last thread definitely worked.

Here's what happens now.  You hit the save button and the values automatically go back to what they were, without changing.


----- aspx file
<%@ Page Language="C#" MasterPageFile="~/MasterPages/Main.Master"  AutoEventWireup="true"  CodeBehind="GlobalSettings.aspx.cs" Inherits="RadGridAutomaticCrudOperations" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphCenter" runat="server">
    <telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
        <script type="text/javascript">

            function OnClientClose(sender, eventArgs) {


                if (eventArgs.get_argument() == 'true')
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("Reload");

                else
                    return;
            }

        </script>
        </telerik:RadCodeBlock>
<telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True" AllowSorting="False"
            AllowAutomaticInserts="True" PageSize="10" AllowAutomaticUpdates="True" AllowMultiRowEdit="False"
            AllowPaging="False" DataSourceID="DataSource1" OnItemUpdated="RadGrid1_ItemUpdated"
            AllowFilteringByColumn="False" Skin ="Windows7" OnItemDeleted="RadGrid1_ItemDeleted" OnNeedDataSource="RadGrid1_NeedDataSource" >
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView Width="100%" CommandItemDisplay="TopAndBottom" DataKeyNames=""
                DataSourceID="DataSource1" HorizontalAlign="NotSet" EditMode="InPlace" AutoGenerateColumns="False">
                <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="false" />
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" Visible="True">
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                        <ItemStyle CssClass="MyImageButton" />
                    </telerik:GridEditCommandColumn>               
                    <telerik:GridBoundColumn DataField="Description" FilterControlAltText="Filter Description column" HeaderText="Description" SortExpression="Description" UniqueName="Description" ReadOnly="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Value" FilterControlAltText="Filter Value column" HeaderText="Value" SortExpression="Value" UniqueName="Value">
                    </telerik:GridBoundColumn>
                    <telerik:GridCheckBoxColumn DataField="IsActive" DataType="System.Boolean" FilterControlAltText="Filter IsActive column" HeaderText="IsActive" SortExpression="IsActive" UniqueName="IsActive" ReadOnly="true">
                    </telerik:GridCheckBoxColumn>
 
                </Columns>
                <EditFormSettings>
                   <FormTableItemStyle Wrap="False"></FormTableItemStyle>
                    <FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
                    <FormMainTableStyle GridLines="None" CellSpacing="0" CellPadding="3" BackColor="White"
                        Width="100%" />
                    <FormTableStyle CellSpacing="0" CellPadding="2" Height="110px" BackColor="White" />
                    <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle>
                    <EditColumn ButtonType="ImageButton"
                        UniqueName="EditCommandColumn1" CancelText="Cancel edit">
                    </EditColumn>
                    <FormTableButtonRowStyle HorizontalAlign="Right" CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableImageSprites="True">
            </FilterMenu>
        </telerik:RadGrid>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server"></telerik:RadWindowManager>
    </telerik:radajaxpanel>
        <asp:sqldatasource selectcommand="SELECT Description, Value, IsActive FROM AppConfiguration" connectionstring="<%$ ConnectionStrings:SludgeBillingSystem %>" providername="System.Data.SqlClient" id="DataSource1" runat="server"></asp:sqldatasource>
            </asp:Content>

----- code behind
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;

/// <summary>
/// Summary description for defaultcs
/// </summary>
public class defaultcs : System.Web.UI.Page
{
    protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)
        {
            if (!(e.Item is GridEditFormInsertItem))
            {
                GridEditableItem item = e.Item as GridEditableItem;
                GridEditManager manager = item.EditManager;
                GridTextBoxColumnEditor editor = manager.GetColumnEditor("CustomerID") as GridTextBoxColumnEditor;
                editor.TextBoxControl.Enabled = false;
            }
        }
    }
    protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)
    {
        if (e.Exception != null)
        {

            e.ExceptionHandled = true;
            SetMessage("Customer cannot be inserted. Reason: " + e.Exception.Message);

        }
        else
        {
            SetMessage("New customer is inserted!");
        }
    }
    private void DisplayMessage(string text)
    {
    //  RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));
    }
    
    private void SetMessage(string message)
    {
        gridMessage = message;
    }

    private string gridMessage = null;

    protected void RadGrid1_PreRender(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(gridMessage))
        {
            DisplayMessage(gridMessage);
        }
    }
}

public partial class RadGridAutomaticCrudOperations : System.Web.UI.Page
{
    private string gridMessage = null;

    protected void RadGrid1_DataBound(object sender, EventArgs e)
    {
        if (!string.IsNullOrEmpty(gridMessage))
        {
            DisplayMessage(gridMessage);
        }
    }

    protected void RadGrid1_ItemUpdated(object source, Telerik.Web.UI.GridUpdatedEventArgs e)
    {
        if (e.Exception != null)
        {
            e.KeepInEditMode = true;
            e.ExceptionHandled = true;
            SetMessage("Update failed. Reason: " + e.Exception.Message);
        }
        else
        {
            SetMessage("Item updated!");
        }
    }

    protected void RadGrid1_ItemInserted(object source, GridInsertedEventArgs e)
    {
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            SetMessage("Insert failed! Reason: " + e.Exception.Message);
        }
        else
        {
            SetMessage("New product is inserted!");
        }
    }

    protected void RadGrid1_ItemDeleted(object source, GridDeletedEventArgs e)
    {
        if (e.Exception != null)
        {
            e.ExceptionHandled = true;
            SetMessage("Delete failed! Reason: " + e.Exception.Message);
        }
        else
        {
            SetMessage("Item deleted!");
        }
    }

    private void DisplayMessage(string text)
    {
        RadGrid1.Controls.Add(new LiteralControl(string.Format("<span style='color:red'>{0}</span>", text)));
    }

    private void SetMessage(string message)
    {
        gridMessage = message;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        //    RadGrid.

    }

    protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {

    }
}
Princy
Top achievements
Rank 2
 answered on 18 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?