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

Hi Telerik Team,

Using Telerik.Web.UI.ExportInfrastructure we are generating an excel , and looking out a way to fill the cell colors , which we achieved but after filling cell colors borders getting disappeared. I tried using below code to set borders but still borders not applying

 


            int currentRow = 1;
            eis.Table WS_Sample = new eis.Table("Sample");
            eis.Row headerRw1 = WS_PriorAuthorization.Rows[currentRow];
            headerRw1.Style.BackColor = System.Drawing.Color.Red;
            headerRw1.Style.BorderLeftColor = System.Drawing.Color.Green;
            headerRw1.Style.BorderRightColor = System.Drawing.Color.Green;
            //headerRw1.Cells[1, currentRow].Style.BorderLeftWidth = Unit.Pixel(35);
            //headerRw1.Cells[1, currentRow].Style.BorderRightWidth = Unit.Pixel(35); 
            headerRw1.Style.BorderLeftWidth = Unit.Pixel(35);
            headerRw1.Style.BorderRightWidth = Unit.Pixel(35);
            headerRw1.Style.ForeColor = System.Drawing.Color.Black;
            headerRw1.Style.Font.Bold = true;

Had
Top achievements
Rank 1
Iron
 updated answer on 10 Jun 2022
2 answers
807 views
Hello,
I have a column in currency format and in the Grid presentation it shows right, for example: 200.00, but when exporting to excel it shows 200. What can I do to solve this problem?
Had
Top achievements
Rank 1
Iron
 answered on 10 Jun 2022
0 answers
145 views

<telerik:RadAsyncUpload runat="server" ID="rauAttachDoc" DropZones=".DropZoneExit" />
<div id="divDropArea" runat="server" class="DropZoneExit"><%=Q2Utils.FormatDropZoneText(rauAttachDoc)%></div>

 

 For Each fileUploaded As UploadedFile In rauAttachDoc.UploadedFiles

 ........

Next

I have uplaod a lic2 type file into RadAsyncUpload. But rauAttachDoc.UploadedFiles.count is zero. unbale to read the file from the behind code.

 

SAHAN
Top achievements
Rank 1
 asked on 10 Jun 2022
3 answers
390 views

Hi.

We have an issue with the RadEditor causing an entire Ajax update panel to fail on an async postback.

This only happens if the RadEditor has been generated dynamically, if it is put in at design time for example on a user control.   However our existing code base is heavily reliant on the editor being created dynamically.

We have tested this on most browsers and only seems to be an issue on Safari V14 and Safari V15.  We have also tested using various versions of the Telerik controls including the Jan 2022 release.  IMO It’s likely that the problem has come about because of a change to Safari, rather than a change to the RadEditor.

I have recreated this using a standard webforms app template in VB in visual studio 2019 , targeting framework 4.7

This can be created using a very simple form.

 <form id="form1" runat="server">
               <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

        <div>
                   <asp:Label ID="Label2" runat="server" Text="Outside The Panel"></asp:Label>

            <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                    <asp:Label ID="Label1" runat="server" Text="Inside the Panel"></asp:Label>


                </ContentTemplate>
                <Triggers>

                    <asp:AsyncPostBackTrigger ControlID="Button2"/>
                </Triggers>
            </asp:UpdatePanel>

            <asp:Button ID="Button1" runat="server" Text="Sync"/>
            <asp:Button ID="Button2" runat="server" Text="ASync"/>
        </div>

    </form>

 

with a very simple code behind and running in a version of Safari 14 +

 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim radEditor = New Telerik.Web.UI.RadEditor

        radEditor.ID = "Editor2"
        RadEditor.Enabled = True

        PlaceHolder1.Controls.Add(RadEditor)

    End Sub

    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Label1.Text = "Updated Label 1 (sync)"
        Label2.Text = "Updated label 2 (sync)"
    End Sub

    Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        Label1.Text = "Updated Label 1 (async)"
        Label2.Text = "Updated label 2 (async)"
    End Sub  
                                                            

Matthew
Top achievements
Rank 1
Iron
 answered on 09 Jun 2022
9 answers
2.4K+ views
I have a web application that is using a RadAjaxManager to update some sections of the page automatically after the page loads - for performance so I can load the main content right away and additional content a couple seconds later.  However, I noticed that after the ajax call returns the browser window scrolls to near the top of the page.  This creates a disorienting user experience, especially if the user has scrolled down a little ways before the ajax call returns.

I created a sample application to demonstrate this issue.

Here is the aspx code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikTest._Default" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <telerik:RadScriptManager ID="scriptManager" runat="server"></telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="ajaxManager" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="divRight">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="divRight" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="divLeft">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="divLeft" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <div> 
            <table> 
                <tr> 
                    <td> 
                         <div id="divLeft" runat="server" style="height:2000px; width:400px; border:solid 1px black;">  
                            <asp:Button ID="btn1" runat="server" Text="Post Back" onclick="btn_Click" /> 
                        </div> 
                    </td> 
                    <td> 
                        <div id="divRight" runat="server" style="height:200px; width:400px; border:solid 1px black;">  
                            <asp:Button ID="btn2" runat="server" Text="Post Back" onclick="btn_Click" /> 
                        </div> 
                        <div style="height:1800px; width:400px; border:solid 1px blue;"></div> 
                    </td> 
                </tr> 
            </table> 
             
        </div> 
    </form> 
</body> 
</html> 
 

The code behind:
using System;  
using System.Collections;  
using System.Configuration;  
using System.Data;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.HtmlControls;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
 
namespace TelerikTest  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
        }  
 
        protected void btn_Click(object sender, EventArgs e)  
        {  
            System.Threading.Thread.Sleep(5000);     
        }  
    }  
}  
 


This page has two buttons on it that do ajax posts and sleep for 5 seconds.  When you click on either one, immediately scroll down the page.  Once the ajax call returns, the browser window returns to the top of the page.  Is there a way to prevent this?






Dana Cobb
Top achievements
Rank 1
Iron
 answered on 07 Jun 2022
1 answer
170 views
I have a RadTreeList that is bound to a very large amount of data (100,000 + rows of data). The user is searching and is only interested in only part of the data, perhaps 20-30 rows anywhere in the data bound to the control. These rows will most likely be between child/parents within the treelist and wont have a nice parent/child relationship to display properly. What I want is to only be able to display a partial view of the data around what the user searched on and have the data look like a "snapshot" of the entire treelist. Has anyone done anything like this or are there any suggestions? Any help is appreciated.
Peter Milchev
Telerik team
 answered on 07 Jun 2022
1 answer
205 views

Is there a recommended way to use the RadBinaryImage control to serve an image via CSS?

Ideally, I would like to replace a line like this:

background-image: url("mybackground.gif");

with something like this:

background-image: url("<%=  RadBinaryImage1.UrlTheBrowserRequests %>");
<telerik:RadBinaryImage ID="RadBinaryImage1" runat="server"  />

...but as far as I can tell, the serving url not exposed. Is the url is deterministic enough to recreate?

I'm open to alternatives, too. The best I've come up with so far is styling the image as a relatively positioned layer, but there are significant complexities and limitations to that approach, and any explicit sizing plays poorly with the serverside size that get rendered by the control.

Thanks,

Phil

 

 

Peter Milchev
Telerik team
 answered on 06 Jun 2022
1 answer
186 views

Hello,

Radgrid combined filter options not showing in Mobile/Responsive Device

When I click on filter icon in RadGrid than sub menu of filter options are not showing in Mobile/Responsive device.

FYI - In web its working fine.

Please do the needful for the same and Let me know if anyone wants more details.

Thanks,

Mukesh Prajapati

Rumen
Telerik team
 answered on 03 Jun 2022
1 answer
278 views

Hi,

 

My Scenario is I have to export a RadGrid,

I have created a grid name grdExport in aspx file and binding datasource in aspx.vb file.

My problem is i have to assign datasource dynamically,

For example, I have 5 different datasources ie A,B,C,D,E

First i assign "A" datasource to grdExport i will prepare a workbook for that,

then i assign "B" datasource to grdExport i will prepare a workbook for that.

I will repeat the same above process for all the datasources,

my issue is data exporting but the datasource "A" is repeating for rest of the datasources,

I dont know what i have missed and where i missed,

Here is my code,

NOTE: GetProcessDataForExport() is inside the for loop, i have to assign different datasources based on parameter(ModuleId) i got.

 

Public Function GetProcessDataForExport(ByVal ModuleId As Integer) As xlsx.Workbook
            Try
                Dim Shift As New ShiftSettings(TabId)
                Dim ds As DataSet
                ds = SqlDataProvider.phdag_GetShiftTags(ModuleId, KPIModuleId)

                grdExportData.MasterTableView.GetColumn("Description").Visible = CType(SgsSettings("show_Description"), Boolean)
                grdExportData.MasterTableView.GetColumn("Tag").Visible = CType(SgsSettings("show_Tag"), Boolean)
                grdExportData.MasterTableView.GetColumn("UOM").Visible = CType(SgsSettings("show_UOM"), Boolean)
                grdExportData.MasterTableView.GetColumn("Limits").Visible = CType(SgsSettings("show_Range"), Boolean)
                grdExportData.MasterTableView.GetColumn("Target").Visible = CType(SgsSettings("show_Plan"), Boolean)
                grdExportData.MasterTableView.GetColumn("Current").Visible = CType(SgsSettings("show_CurrV"), Boolean)
                grdExportData.MasterTableView.GetColumn("ShiftAvg").Visible = CType(SgsSettings("show_ShiftAvgV"), Boolean)
                grdExportData.MasterTableView.GetColumn("Shift24HrAvg").Visible = CType(SgsSettings("show_Shift24HrV"), Boolean)
                grdExportData.MasterTableView.GetColumn("ShiftMinVal").Visible = CType(SgsSettings("show_ShiftMinV"), Boolean)
                grdExportData.MasterTableView.GetColumn("ShiftMaxVal").Visible = CType(SgsSettings("show_ShiftMaxV"), Boolean)
                grdExportData.MasterTableView.GetColumn("TimeStamp").Visible = CType(SgsSettings("show_TimeStamp"), Boolean)
                grdExportData.MasterTableView.GetColumn("CorrectiveAction").Visible = CType(SgsSettings("show_CorrAct"), Boolean)

                'Add Row Values
                Dim dt As DataTable = GetTagsByTagType(ds.Tables(1), TagType, DeviationType)

                grdExportData.ExportSettings.IgnorePaging = True
                grdExportData.ExportSettings.FileName = ModuleId
                grdExportData.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx

                grdExportData.DataSource = New String() {}
                grdExportData.DataSource = dt
                grdExportData.Rebind()

                Return TryCast(grdExportData.MasterTableView.GenerateXlsxOutput(Of xlsx.Workbook)(), xlsx.Workbook)

            Catch ex As Exception
            End Try
        End Function

Thanks.

 

 

Mukesh
Top achievements
Rank 1
Iron
 answered on 02 Jun 2022
0 answers
135 views

I have 2 question Related to 508 compliancy of RadGrid . Screen Reader used is Jaws.

Visual studio 2019

VB.NET

Framework version 4.8

Product: Telerik ASP.NET Ajax controls

Browser: Edge and Chrome

  1. RadGrid property EnableAriaSupport = True is causing Jaws to Read Normal grid without nesting structure to announce as Nesting Level 1. If we remove the property, how is it going to affect the 508 accessibility.
  2. RadGrid Pager is being rendered as nested table. Is there a way for the pager not to render as table but normal div with the pager being aligned to center . I used render mode of Lightweight That enabled the Pager to be rendered as div but the layout is not centered.
Sara
Top achievements
Rank 1
 updated question on 31 May 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?