Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
263 views

We currently output our data to a Grid and then export to XLSX, however we are experiencing a unique problem with one of the records.  The record in question returns the word "Infinity" and it causes a problem with opening the Excel document.  We receive the following error message:

"Excel found unreadable content in '....aspx'.  Do you want to recover the contents of this workbook?  If you trust the source of this workbook, click Yes."

Clicking Yes will repair the worksheet.  

After doing much testing to narrow down what record it is failing on, we have concluded it is failing on this record with the word "Infinity".  If I change the database record to "Infinity CU", there is no problems and the Excel file will open properly.  If I save the Excel document after all these messages, it will save properly and once reopened it will be successful.  CUName is the field that it fails on. 

I am including the code that displays the grid but might you offer a suggestion on how to remedy this problem?

<telerik:RadGrid ID="_grdInvisibleGridForExcel" runat="server" Visible="false" HeaderStyle-Font-Bold="true" HeaderStyle-BackColor="#4F9A25" HeaderStyle-ForeColor="White"  CellSpacing="-1" GridLines="Both" GroupPanelPosition="Top" AutoGenerateColumns="false" ExportSettings-Excel-Format="ExcelML">
            <MasterTableView>
                <Columns>
                    <telerik:GridDateTimeColumn DataField="Financial Date" HeaderText="Financial Date" UniqueName="FinancialDate" FilterControlAltText="Filter FinancialDate column"></telerik:GridDateTimeColumn>
                    <telerik:GridBoundColumn DataField="charter_Num" HeaderText="Charter #" UniqueName="CharterNum" FilterControlAltText="Filter CharterNum column"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="asi_Num" HeaderText="ASI #" UniqueName="AsiNum" FilterControlAltText="Filter AsiNum column"></telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="cuName" HeaderText="CU Name" UniqueName="cuName" FilterControlAltText="Filter cuName column"></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>

 

 

Kurt Kluth
Top achievements
Rank 1
 answered on 23 Dec 2016
1 answer
235 views

I have a dropdown the controls the visibility of some controls including a RadExplorer. This is all in a BootStrap form where the form-group visibility is changed.  If I start with the RadExplorer invisible, the toolbar and windows are not formed properly. Resizing the browser window fixes it though all visibility changes until the next refresh. If I start out with the RadExplorer visible and make it invisible on loading the toolbar is fine but the windows are not correct, please see the attached picture.  I need to be able to make the RadExplorer invisible at page load.

The function BackgroupSettingChanged(); changes the visiblity of controls.

Sys.Application.add_load(function loadHandler() {
    BackgroupSettingChanged();
    Sys.Application.remove_load(loadHandler);
});

BackgroupSettingChanged(); calls ObjVisible() to change the visibility of the different div's.

function ObjVisible(control, visible)
{
    if (visible) {
        control.style.visibility = 'visible'
        control.style.display = "block";
    }
    else {
        control.style.visibility = 'hidden';
        control.style.display = "none";
    }
}

The RadExplorer is in a form-group

<div class="form-group" id="ExplorerDiv" runat="server" >
    <asp:Label runat="server" AssociatedControlID="SelectImage" CssClass="col-md-2 control-label">Explorer</asp:Label>
    <div class="col-md-4" >
        <span >Use the file explorer to choose an image, you can download an image.</span>
        <telerik:RadFileExplorer RenderMode="Lightweight" runat="server" ID="FileExplorer1" Width="580px" Height="300px"  EnableCreateNewFolder="true"
            VisibleControls="Grid,TreeView,ContextMenus,Toolbar,FileList"
            AllowPaging="true" PageSize="8" OnClientItemSelected="OnClientItemSelected">
            <Configuration  EnableAsyncUpload="true"  AllowMultipleSelection="true"
                ViewPaths = "~/Organizations/Org3"
                UploadPaths = "~/Organizations/Org3"
                DeletePaths = "~/Organizations/Org3"></Configuration>
        </telerik:RadFileExplorer>
    </div>
</div>

 

Is there something I can call on the RadExplorer when I make it visible to ensure it initializes properly?  or maybe my initial call to add_load to make it invisible could be made on another startup event?

It is actually the 

control.style.display = "none";

that causes the problem. Without "none", the file list window of the RadExplorer shows even though the RadExplorer div is visibility='hidden'.  The is needed to get rid of the space taken by the controls.  I also have a RadColorPicker that works fine if it does not start out invisible (with set, forced to accept this with its accompanying disappearing flash as the window opens).

George

Vessy
Telerik team
 answered on 23 Dec 2016
6 answers
125 views

Erro;

Uncaught TypeError: Cannot read property 'clear' of null

 

code:

$find("<%=radnumericbox.ClientID%>").clear();

 

what im doing badly? i have more radnuemirc boxes and they are running smoothly

 

BestRegards

 

Vasil
Telerik team
 answered on 23 Dec 2016
6 answers
314 views

Hello,

How can I turn off the highlighting on specific nodes in a radTreeView?  There are specific nodes that I don't want to change in any way when hovering over them.

I'm using UI for ASP.NET AJAX, V2013.1.417.45

Thank you.

Ivan Danchev
Telerik team
 answered on 23 Dec 2016
5 answers
427 views
I am using the below radtextbox and the onkeyup is not working for it. Below is the code:
<td align="left" style="Width:80px; padding-bottom:10px;"><telerik:RadTextBox ID="SphereRightText" runat="server" width="50" OnKeyUp="doRightSphereValidation();" onchange="FormatRightSphere(2, true);" /></td>
function doRightSphereValidation()
    {
        if (IsRightLensItemSelected())
        {
            var textBox = $find("<%=SphereRightText.ClientID %>");
            return validation_ValidateNumericTextBox(textBox, RightSphereMinimum, RightSphereMaximum, false, TurnInvalidInputsRed());
        }
        else
        {
            return true;
        }
    }
Vasil
Telerik team
 answered on 23 Dec 2016
1 answer
368 views

Hello, I am looking for support with the radwindowmanager and the autosize and autosize behavior properties...I've been trying to implement the same scenario as these two links:
- http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/autosizing-issues

-http://demos.telerik.com/aspnet-ajax/window/examples/autosize/defaultcs.aspx

no luck... I always need to have a width and a height coming from the codebehind, else it only displays a small square. I am not sure if this is cause by the way the app is programmed...anyway hope somebody can jump in and help out. Thanks...here is the code driving the window: 

starts here:
gui.OpenRadWindow(
                            url: "/Pages/Inventory/Add_Product.aspx", 
                            width: 800, 
                            height: 550, 
                            title: "Add Product", 
                            modal: true, 
                            javascriptOnClientClose: "OnClientClose", 
                            page: Page
                        );

goes to here:

 

public void OpenRadWindow(string url, int width, int height, string title, bool modal, WindowBehaviors behaviors, bool showDuringLoad, string javascriptOnClientClose, Page page)
        {
            RadWindowManager winMgr = null;

            winMgr = (RadWindowManager)page.Master.FindControl("RadWindowManager_Global");

            if (winMgr != null)
            {
                RadWindow radWindowForm = new RadWindow();
                radWindowForm.ID = "radWindowForm_" + Guid.NewGuid().ToString();
                radWindowForm.MinWidth = new System.Web.UI.WebControls.Unit(width,System.Web.UI.WebControls.UnitType.Pixel);
                radWindowForm.MinHeight = new System.Web.UI.WebControls.Unit(height, System.Web.UI.WebControls.UnitType.Pixel);
                radWindowForm.AutoSize = true;
                radWindowForm.AutoSizeBehaviors = WindowAutoSizeBehaviors.Default;
                radWindowForm.Title = title;
                radWindowForm.Modal = modal;
                radWindowForm.NavigateUrl = url;
                radWindowForm.Behaviors = behaviors; 
                radWindowForm.EnableShadow = true;
                radWindowForm.EnableTheming = true;
                radWindowForm.KeepInScreenBounds = true;
                radWindowForm.ShowContentDuringLoad = showDuringLoad;
                radWindowForm.VisibleStatusbar = false;
                radWindowForm.VisibleOnPageLoad = true;
                radWindowForm.OnClientClose = javascriptOnClientClose;
                winMgr.EnableViewState = false;
                winMgr.Windows.Add(radWindowForm);                
            }
        }

this is the control in master page:

 

<telerik:RadWindowManager ID="RadWindowManager_Global" runat="server" AutoSize="true" AutoSizeBehaviors="Default" Style="z-index: 7001" />

thanks for the support. I will add additional info if needed.

Ianko
Telerik team
 answered on 23 Dec 2016
2 answers
154 views

I am setting a default recurrence rule in the FormCreated event when opening an advanced insert form as described at http://docs.telerik.com/devtools/aspnet-ajax/controls/scheduler/recurrence-editor/server-side-programming/populating-the-recurrence-rule

 

When the Save button is clicked, I am attempting to read the recurrence rule from e.Appointment.RecurrenceRule. This always returns the default rule that I set in FormCreated, even if the user altered the recurrence settings in the form before clicking Save. If I do not set the recurrence rule in FormCreated, this returns the settings that the user chose as expected.

 

Is there any way to set the default recurrence settings that are shown when the form is opened and still access the user's chosen settings in the AppointmentInsert event?

Veselin Tsvetanov
Telerik team
 answered on 23 Dec 2016
3 answers
228 views

Hello

My Grid

 

<telerik:RadGrid RenderMode="Lightweight" ID="catGrid" Width="944" AllowPaging="false" runat="server" GridLines="None" Skin="Office2010Blue"
                                                         AllowSorting="false" AutoGenerateColumns="False" OnNeedDataSource="CatGridNeedDataSource" ShowFooter="false" ShowStatusBar="false"
                                                         OnItemCommand="CatGridItemCommand" OnItemDataBound="CatGridItemDataBound">
                                            <MasterTableView DataKeyNames="ID" ClientDataKeyNames="ID">
                                                <Columns>
                                                    <telerik:GridCalculatedColumn  DataFields="TestName, TestNameDetail" Expression="{0}+{1}" HeaderText="TEST NAME">
                                                    </telerik:GridCalculatedColumn>
                                                    <telerik:GridCalculatedColumn  DataFields="Standard, StandardDetail" Expression="{0}+{1}"  HeaderText="STANDARD">
                                                    </telerik:GridCalculatedColumn>
                                                    <telerik:GridBoundColumn DataField="Pricing" HeaderText="PRICING" DataFormatString="{0:c}" HtmlEncode="false" ItemStyle-HorizontalAlign="right">
                                                    </telerik:GridBoundColumn>
                                                    <telerik:GridTemplateColumn HeaderText="DETAIL" UniqueName="DETAIL">
                                                        <ItemTemplate>
                                                            <telerik:RadImageButton ID="detailBtn" runat="server" Image-Url="~/App_Themes/Site/Core/DetailIcon.png" Width="32" Height="32" CommandName="Detail" CommandArgument='<%#Eval("CategoryID") +","+ Eval("Details")%>'></telerik:RadImageButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                    <telerik:GridTemplateColumn HeaderText="REPORT" UniqueName="REPORT">
                                                        <ItemTemplate>
                                                            <telerik:RadImageButton ID="ReportBtn" runat="server" Image-Url="~/App_Themes/Site/Core/Reporticon.png" Width="32" Height="32" CommandName="Report" Value="ID"></telerik:RadImageButton>
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>
                                                </Columns>
                                            </MasterTableView>
                                            <ClientSettings EnableRowHoverStyle="true">
                                            </ClientSettings>
                                        </telerik:RadGrid>

 

My Code Behind

protected void CatGridItemDataBound(object sender, GridItemEventArgs e)
{
    
    //Is it a GridDataItem
    if (e.Item is GridDataItem)
    {
        var oRow = (DataRowView) e.Item.DataItem;
        var detr = (RadImageButton) oRow["DETAIL"];
        string detailTF = (detr).CommandArgument.ToString();
        var arg = new string[2];
        char[] splitter = { ',' };
        arg = detailTF.Split(splitter);
        HasDetail = Convert.ToBoolean(arg);
        if (HasDetail == true)
        {
            catGrid.MasterTableView.GetColumn(columnUniqueName: "DETAIL").Display = true;
        }
        else
        {
            catGrid.MasterTableView.GetColumn(columnUniqueName: "DETAIL").Display = false;
        }
    }
}

 

I am trying to get the second CommandArgument value which is true or false of the ImageButton. Once I have that value if false I want to set that row item to display.false. Currently I am receiving an error:

Unable to cast object of type 'DynamicClass1' to type 'System.Data.DataRowView'.

How can I achieve my goal?

Viktor Tachev
Telerik team
 answered on 23 Dec 2016
6 answers
335 views

Hello,

 

We use the Scheduler control in our Planning-application.  This is all working nicely. However, the small "DatePicker" above the scheduler does not select the date in the Scheduler view.

I have updated the control to the newest version.

Can you please help me fix the problem?

 

André Harder
Top achievements
Rank 1
 answered on 23 Dec 2016
0 answers
128 views

The latest release of Google Chrome browser (v.55) had introduced changes that affect the RadPanelBarItems highlight effect when they are hovered. The issue could be overcome by changing the RenderMode of the PanelBar to Lightweight.

For more information on the Lightweight rendermode, refer to the following documentation article:

http://docs.telerik.com/devtools/aspnet-ajax/controls/panelbar/radpanelbar-items/render-modes

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 23 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?