Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
228 views

Hi,

if I close RadWindow and then reopen it using .setVisible(true) on client side - close button in window title not working anymore. Is it possible to fix this?

here a sample page, press open, close window, press reopen, try to close - nothing happens.

<%@ 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">
<head>
    <script type="text/javascript">
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }
        function TestCloseDates() {
            var manager = GetRadWindowManager();
            var oWnd = manager.getWindowById('wndDates');
            oWnd.setVisible(true);
            //oWnd.restore();
            oWnd.setActive(true);
        }
    </script>
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <input type="button" value="Open" onclick="window.radopen('', 'wndDates');"  />
        <input type="button" value="Reopen" onclick="TestCloseDates();"  />
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
        <telerik:RadWindowManager ID="wnd1" runat="server">
            <Windows>
                <telerik:RadWindow Height="365px" Width="375px" ID="wndDates" runat="server" ReloadOnShow="True" >
                    <ContentTemplate>
                        Hi There!
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
    </form>
</body>
</html>

Thanks,

Alex

 

Vessy
Telerik team
 answered on 12 Jun 2020
1 answer
167 views

I have a RadDataform, which has DropDownLists added to the Edit and Insert Item Templates :

<telerik:RadDataForm RenderMode="Lightweight" ID="FormCN" runat="server" 
                    OnNeedDataSource="FormCN_NeedDataSource" 
                    OnItemInserting="FormCN_ItemInserting"
                    OnItemUpdating="FormCN_ItemUpdating"
                    OnItemDeleting="FormCN_ItemDeleting"  
                    OnPreRender="FormCN_PreRender"                     
                    DataKeyNames="CN_SEQ"    
                    Skin="MetroTouch" >
         ...
                <ItemTemplate>
                  ...
                </ItemTemplate>
                    
                <EditItemTemplate>
                  ...
                        <div class="rdfRow">
                            <div class="rdfRight" >                               
                                <telerik:RadComboBox ID="cmbPrep" OnPreRender="cmbPrep_PreRender" OnSelectedIndexChanged="cmbPrep_SelectedIndexChanged" AutoPostBack="true" AllowCustomText="true" runat="server" Skin="MetroTouch" EmptyMessage="Prep" style="float:right;"></telerik:RadComboBox>                                               
                            </div>
                            <telerik:RadTextBox ClientEvents-OnLoad="setHeight" RenderMode="Lightweight" TextMode="MultiLine" ID="PREP" runat="server" Text='<%# Bind("PREP") %>' WrapperCssClass="rdfInput" />                            
                        </div>
                       ...
                </EditItemTemplate>

                <InsertItemTemplate>
                  ...
                        <div class="rdfRow">
                            <div class="rdfRight" >                               
                                <telerik:RadComboBox ID="cmbPrep2" OnPreRender="cmbPrep2_PreRender" OnSelectedIndexChanged="cmbPrep2_SelectedIndexChanged" AutoPostBack="true" AllowCustomText="true" runat="server" Skin="MetroTouch" EmptyMessage="Prep" style="float:right;"></telerik:RadComboBox>                                               
                            </div>
                            <telerik:RadTextBox ClientEvents-OnLoad="setHeight" RenderMode="Lightweight" TextMode="MultiLine" ID="PREP2" runat="server" Text='<%# Bind("PREP") %>' WrapperCssClass="rdfInput" />                            
                        </div>
                      ...
                </InsertItemTemplate>

 

Using NeedDataSource:

 Protected Sub FormCN_NeedDataSource(sender As Object, e As RadDataFormNeedDataSourceEventArgs)
        TryCast(sender, RadDataForm).DataSource = SourceDataTable
    End Sub

Public ReadOnly Property SourceDataTable() As DataTable
        Get
            Dim obj As [Object] = ViewState("SourceDataTable")
            If obj IsNot Nothing Then
                Return DirectCast(obj, DataTable)
            Else
                Dim strConnString As String = ConfigurationManager.ConnectionStrings(Session("mYear")).ConnectionString
                Dim con As OracleConnection = New OracleConnection(strConnString)

                cmdQuery = "SELECT QUEUE, BATCH_NUMBER, " &
                               "CN_SEQ, CN_YEAR, METHOD, " &
                               "PREPMETHOD, PREP, RECEIPT, " &
                               "SAMPPREP, SAMPANAL, CALIBRATION, " &
                               "BLANKS, SURROGATES, SPIKES, " &
                               "INTERNSTANDARD, SAMPLES, OTHER, " &
                               "DUPLICATES, SERIALDILUTION " &
                               "FROM CN_DETAILS " &
                               "WHERE QUEUE = '" & cmbQueue.SelectedValue & "' AND BATCH_NUMBER = " & cmbBatchNumber.SelectedValue & " "

                Dim cmd As OracleCommand = New OracleCommand(cmdQuery)

                cmd.Connection = con
                cmd.CommandType = CommandType.Text
                Dim da As OracleDataAdapter = New OracleDataAdapter(cmd)

                Dim dt As New DataTable()
                da.Fill(dt)
                ViewState("SourceDataTable") = dt
                Return dt

                cmd.Dispose()
                con.Close()
                con.Dispose()
            End If
        End Get

    End Property

On DropDownList Selected Item Changed, I need to populate it's associated textbox with the ddl value. This works well for the EditItem:

 Protected Sub cmbPrep_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs)
        Dim cmbItem As RadComboBox = TryCast(sender, RadComboBox)
        Dim radTextBox As RadTextBox = cmbItem.Parent.FindControl("PREP")
        radTextBox.Text = e.Value.ToString
    End Sub

How do I replicate this functionalit for the InsertItem? I tried this:

Protected Sub cmbPrep2_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs)
        Dim cmbItem As RadComboBox = TryCast(sender, RadComboBox)
        Dim radTextBox As RadDataFormInsertItem = cmbItem.Parent

        'radTextBox.Text = e.Value.ToString

        Dim insertedItem As RadDataFormInsertItem = TryCast(radTextBox, RadDataFormInsertItem)

        Dim newValues As New Hashtable()
        insertedItem.ExtractValues(newValues)
        newValues("PREP") = e.Value.ToString
        newValues("CN_SEQ") = 9999999
        newValues("CN_YEAR") = "2020"
        newValues("QUEUE") = cmbQueue.SelectedValue
        newValues("BATCH_NUMBER") = cmbBatchNumber.SelectedValue

        Dim dt As DataTable = ViewState("SourceDataTable")

        Dim newRow As DataRow = dt.NewRow()

        For Each entry As DictionaryEntry In newValues
            newRow(DirectCast(entry.Key, String)) = entry.Value
        Next

        dt.Rows.Add(newRow)
        ViewState("SourceDataTable") = dt
    End Sub

The corresponding InsertItem textbox is not updated, however, if you click cancel and return to View, the item text is there. What am I missing please?

Attila Antal
Telerik team
 answered on 12 Jun 2020
1 answer
506 views

Hello,

When I validate the RadComboBox for the WCAG 2.0 and Section 508 Accessibility Compliance with WAVE, I can see there are some warning/errors.

For instance, the RadComboBox has a tooltip property, which bring the title attribute on the input, but WAVE would prefer to have a label linked to the input instead.
I know there is a Label property that I can set, which generate a label beside the RadComboBox, but I want to link my own label to the ComboBox. 
I could simply do this myLabel.AssociatedControlID(comboBoxId + "_Input");, but I'd rather not do this, in case the combobox change in a future update and the input id is not "comboBoxId + "_Input".

Is it any other way to do it? The best way would have been to access the ClientId of the input within the RadComboBox object.

Thank you.

Peter Milchev
Telerik team
 answered on 12 Jun 2020
2 answers
2.0K+ views

I get the following build warnings on Telerik DLLs.

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'Telerik.Windows.Documents.Spreadsheet.FormatProviders.OpenXml, Version=2018.3.904.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'Telerik.Windows.Documents.Spreadsheet, Version=2018.3.904.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'Telerik.Windows.Documents.Flow, Version=2018.3.904.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'Telerik.Windows.Documents.Core, Version=2018.3.904.40, Culture=neutral, PublicKeyToken=5803cfa389c90ce7' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\Telerik.Web.UI.dll' depends on 'Telerik.Web.Spreadsheet, Version=2018.3.910.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\Telerik.Web.UI.dll' depends on 'Telerik.Everlive.Sdk.Net35, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b28c218413bdf563' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'Microsoft.WindowsAzure.Storage, Version=3.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'Microsoft.AnalysisServices.AdomdClient, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on 'AWSSDK.S3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Severity Code Description Project File Line Suppression State
Warning IDE1003 Analyzer assembly 'C:\Users\George\Project\bin\Telerik.Web.UI.dll' depends on '.Core, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604' but it was not found. Analyzers may not run correctly unless the missing assembly is added as an analyzer reference as well. SignupList 1 Active

Several of the DLLs not found exist in the bin and others do not. 

I do not completely understand the referencing system. It complains about Microsoft.WindowsAzure.Storage which does not have a bin DLL with that name but does have the NuGet package installed.  I do not know what AWS SDK is about since I deploy to Azure, not to AWS.  In this regard, I assume that the Telerik ASP.Net AJAX upgrades should configure everything correctly.  I know that the upgrade changes my .webconfig file on every upgrade since I always fix it.

The project build and runs, I do not understand if the warnings matter (since everything links) but I would like to get rid of them.

Rumen
Telerik team
 answered on 12 Jun 2020
1 answer
96 views

Hi,

is there a way to capture when a command is done on the viewer toolbar?

I'm looking to capture when the zoom changes.

Thank you.

 

Vessy
Telerik team
 answered on 12 Jun 2020
4 answers
147 views

Hello,

I'm trying to localize the RadColorPicker using resource-files placed in the App_GlobalResources of my website, which is working fine for most of the telerik controls (e.g. RadComboBox). In case of the RadColorPicker, adding these resource files doesn't seem change anything. For example the following code does not use any resource-file values for the texts and tooltips of "No color", "Custom color" as well as the "OK" and "cancel" buttons within the "Custom color" sub-control.

<telerik:RadColorPicker runat="server" ID="RadColorPickerStatusColor" Preset="Standard" EnableCustomColor="true" SelectedColor="#FFFFFF" />

 

Because I'm using this control in multiple places, I dislike the way localization for RadColorPicker is beeing described in the docs (Telerik Docs: RadColorPicker). Additionally, I'm not able to find the key for at least the cancel-button within the supplied resource files (en, de, fr; which are available for download at https://www.telerik.com/account/product-download?product=RCAJAX).

As for the screenshot, the current Culture of the website is German, so I would expect the RadColorPicker to be displayed using the RadColorPicker.de-DE.resx file. Obviously these values are English though.

 

Any tips on the missing key for the cancel-button or the fact, that there's no localization at all?

Kind regards

Peter Milchev
Telerik team
 answered on 12 Jun 2020
10 answers
2.2K+ views
Hi,

I have RAD Ajax Controls 2009 Q3 installed, no problem.

I am not sure why, but when I build my site, I get errors like this:

Error    4    The name 'RadMenu1' does not exist in the current context    C:\inetpub\wwwroot\The Playgrounds\The Playgrounds\RSSReader.aspx.cs    150    21    The Playground

I do indeed have a RADMenu with that name in the page, but the codebehind cannot see it.

I have references added to Telerik.Web.UI and my ASPX does too:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


What am I doing wrong?







Doncho
Telerik team
 answered on 11 Jun 2020
8 answers
329 views
When I use Rad Combobox in my Project and on Debugging time the Following Error Generates

WebForm_InitCallback();Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadComboBox, {"_dropDownWidth":0,"_showDropDownOnTextboxClick":false,"_skin":"Office2007","_uniqueId":"ctl00$ContentPlaceHolder1$RetailComponentControl1$ddlFrom","allowCustomText":true,"clientStateFieldID":"ctl00_ContentPlaceHolder1_RetailComponentControl1_ddlFrom_ClientState","collapseAnimation":"{\"type\":12,\"duration\":200}","enableLoadOnDemand":true,"itemData":[],"text":"","value":"","webServiceSettings":"{\"path\":\"/CallbackWebServices/ComboBoxLists.asmx\",\"method\":\"AirportList\"}"}, {"itemsRequesting":itemRequesting}, null, $get("ctl00_ContentPlaceHolder1_RetailComponentControl1_ddlFrom"));
});
Vessy
Telerik team
 answered on 11 Jun 2020
2 answers
239 views

My PageViews controlled by ContentUrl

Can i access "child" page controls from "parent" page?

Preferable in code-behind

Appreciate any suggestions

Yana
Top achievements
Rank 1
Veteran
 answered on 10 Jun 2020
1 answer
74 views

Hi guys!

Sorry, dumb question:

How can I show a lightbox automatically when the page loads?

I have a login form that I would like to pop up after the page "login.aspx" is loaded ... all I get is an empty page ....

"<asp:LoginView ID="LoginView1" runat="server">
<AnonymousTemplate>
<asp:Login ID="Login1" runat="server">"

How can I achieve that?

Thanks in advance for your help

Tom

Attila Antal
Telerik team
 answered on 10 Jun 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?