Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
449 views
Hello,
in javascript you can create a function that controls the upload file if the name is the presence of special characters such as: + / \ @ # $% & etc ...
Hristo Valyavicharski
Telerik team
 answered on 03 Mar 2016
3 answers
267 views

Is it possible in RadTreeView that having a multiple parent and in that multiple parent have a child?

maybe can be described like this:

Node 1
-Member of Node 1 - 1
    Node 2
    - Member of Node 2 - 1
    - Member of Node 2 - 2
    - Member of Node 2 - 3
        Node 3
        - Member of Node 3 - 1

or if it is not possible to use RadTreeView, is there any control that can provide things like this?

 

Thank you in advance

Ivan Danchev
Telerik team
 answered on 03 Mar 2016
1 answer
1.0K+ views

I have two related RadComboBoxes as following:

<telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadDropDownParameterX">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="RadComboBoxCountries" LoadingPanelID="AjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="RadComboBoxSites" LoadingPanelID="AjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="RadComboBoxRts" LoadingPanelID="AjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="RadComboBoxMachines" LoadingPanelID="AjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="RadComboBoxProtocols" LoadingPanelID="AjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadComboBoxCountries">
                 <UpdatedControls>
                     <telerik:AjaxUpdatedControl ControlID="RadCodeBlock1" LoadingPanelID="AjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="RadCodeBlock2" LoadingPanelID="AjaxLoadingPanel1" />
                     <telerik:AjaxUpdatedControl ControlID="RadComboBoxSites" LoadingPanelID="AjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            ...
</telerik:RadAjaxManagerProxy>
...
<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Skin="BlackMetroTouch">
</telerik:RadAjaxLoadingPanel>
...
<div class="right">
    <span>Select X-parameter</span>
    <telerik:RadDropDownList ID="RadDropDownParameterX" runat="server" 
        DropDownHeight="120px" Width="120px" Skin="BlackMetroTouch" DropDownWidth="120px"
            OnSelectedIndexChanged="RadDropDownParameterX_SelectedIndexChanged"
            AutoPostBack="true" >
            <Items>
                <telerik:DropDownListItem Text="Countries" Value="Countries" Selected="true" />
                <telerik:DropDownListItem Text="Sites" Value="Sites" />
                <telerik:DropDownListItem Text="Rts" Value="Rts" />
                <telerik:DropDownListItem Text="Machines" Value="Machines" />
                <telerik:DropDownListItem Text="Protocols" Value="Protocols" />
            </Items>
</telerik:RadDropDownList>
...    
<div class="combo countries">
    <telerik:RadComboBox ID="RadComboBoxCountries" runat="server"
        AutoPostBack="True"
        onselectedindexchanged="RadComboBoxCountries_SelectedIndexChanged"
        CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
        Label="Country" Skin="BlackMetroTouch" >                           
    </telerik:RadComboBox>
    <div class="subv"><telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <%= SelectedCountriesText %></telerik:RadCodeBlock></div>
</div>
             
<div class="combo sites">
    <telerik:RadComboBox ID="RadComboBoxSites" runat="server"
        CheckBoxes="true"
        AutoPostBack="true"
        onselectedindexchanged="RadComboBoxSites_SelectedIndexChanged"
        EnableCheckAllItemsCheckBox="true"
        Label="Site" Skin="BlackMetroTouch">
    </telerik:RadComboBox>
    <div class="subv"><telerik:RadCodeBlock ID="RadCodeBlock2" runat="server"> <%= SelectedSitesText %></telerik:RadCodeBlock></div>
</div

What i am trying to achieve is to have the second comboBox (RadComboBoxSites) populated upon selected Values of first comboBox.

Tried to achive that by deleting all items of RadComboBoxSites each time a SelectedIndexChanged event is occured on comboBox RadComboBoxCountries in the way depicted below:

Protected Sub RadComboBoxCountries_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
    If (RadDropDownParameterX.SelectedValue.Equals("Sites"))
        Dim collectionPopulatedSites = RadComboBoxSites.Items
        For each s In collectionPopulatedSites
            Dim RadComboBoxSite As RadComboBoxItem = RadComboBoxSites.Items.FindItemByValue(s.Value)
            If RadComboBoxSite IsNot Nothing Then
                RadComboBoxSite.Remove
            End If
        Next
             
        ' get new list of selected countries
        Dim collectionSelectedCountries = RadComboBoxCountries.CheckedItems
        For each c in collectionSelectedCountries
 
            Dim listaCountrySites As List(Of AffideaGeneralWeb.BLL.General.Sites)
            listaCountrySites = GetAllCountrySites(c.Value)
                 
            For each s in listaCountrySites
                     
                Dim RadComboBoxSite As RadComboBoxItem = RadComboBoxSites.Items.FindItemByValue(s.ID)
 
                If RadComboBoxSite Is Nothing Then
                    RadComboBoxSite = New RadComboBoxItem()
                    RadComboBoxSite.Text = s.Title
                    RadComboBoxSite.Value = s.ID
                    RadComboBoxSites.Items.Add(RadComboBoxSite)
                End If
                     
            Next
        Next
 
    End If
 
End Sub

However when i am trying to "RadComboBoxSite.Remove" i am getting an exception:

An exception of type 'System.InvalidOperationException' occurred in mscorlib.dll but was not handled in user code. Additional information: The collection has changed, the enumeration operation may not be performed

Is there any working example of related comboBoxes (handles in the server side)? 

How could i delete all items of second comboBox and re-build it, each time the user alters selection on the first comboBox?

Nencho
Telerik team
 answered on 03 Mar 2016
4 answers
97 views

Hi Ivan

With the latest release (and recent internal builds) I have noticed that the navigation font being displayed in chrome is quite different to that of IE.  Chrome seems to be a somewhat bold while IE is a fairly skinny one. Attached image showsIE rendering on left and Chrome on right.

Is Chrome rendering it with Roboto while IE isn't?  I've tried to use the css property browsers but they aren't telling me what the actual font being rendered is :(

Regards

Jon

Jon
Top achievements
Rank 1
 answered on 03 Mar 2016
2 answers
470 views

Hello!

I wasn't sure how to title my thread. I have a test case that I'm not sure how to handle appropriately.

I have the following control set up:

<telerik:RadAsyncUpload ID="uploadControl" runat="server"
    Skin="MetroTouch"
    UseApplicationPoolImpersonation="true"
    AutoAddFileInputs="true"
    InitialFileInputsCount="1"
    EnableInlineProgress="true"
    MultipleFileSelection="Automatic"
    MaxFileInputsCount="5" >

 

This control is in a RadWizard that saves each step incrementally (Next/Previous click, NavigationButton Click). The RadWizard's validation is triggered on the "Finish" button. I am using the MaxFileInputsCount property to determine how many files are required to pass validation - in the case above, the control needs 5 files to be uploaded to pass field validation on the "Finish" button click.

Here is the scenario that is causing me trouble: 

Let's say I launch the RadWizard, go to the step with my upload control and only upload 2 of the 5 required files. I click "Next" and the 2 files are uploaded and their paths saved to the database. When I click "Finish", I get an error saying I can't submit because I need to upload 3 more files. This all works fine.

Now, I exit and relaunch the RadWizard to complete my form, and I go to the upload control step. 

Currently, if I upload 2 out of 5 files, exit and go back in the application, I can upload another 5 files instead of just 3. How can I re-load the AsyncUpload control and add the 2 previously-uploaded files to the UploadedFileCollection() in order for the control to know that I need 3 more files before hiding the FileInput button and so that I can validate?

I hope that makes sense!

I tried setting the UploadedFiles() property of the AsyncUpload control as demonstrated below, but that property is read-only...  and there is no "Add" function for the UploadeFilesCollection(), so obviously that code gives me a bunch of errors.

Dim colFiles As Telerik.Web.UI.UploadedFileCollection()
For Each filename In arrUploadedFiles
    Dim objFile As Telerik.Web.UI.UploadedFile
    objFile.FileName = strUploadPath & filename.ToString
    colFiles.Add(objFile)
Next
uploadControl.UploadedFiles = colFiles

 

 

 

Ivan Danchev
Telerik team
 answered on 03 Mar 2016
1 answer
82 views

i want to display image on upload successfully. like given in attached file.

Don't want to display name. want to show image directly.

please help me. thanks in advance.

Peter Filipov
Telerik team
 answered on 03 Mar 2016
4 answers
120 views

In a form, I have both RadComboBox and RadDatePicker and I want to enable an asp button if any change is made to them. How I can make it possible.

I use below code for textboxes and it's working fine:

$(document).ready(function () {
 
    $("#BtnUpdate").attr('disabled', 'disabled');
 
    $("input.UpdateCSS").keyup(function () {
        $("#BtnUpdate").removeAttr('disabled');
    });
 
 
 
    $("input.UpdateCSS").change(function () {
        $("#BtnUpdate").removeAttr("disabled");
    });

Eyup
Telerik team
 answered on 03 Mar 2016
1 answer
92 views

Hi

Does ClientExportManager support rtl languages?

Thanks

Ivan Danchev
Telerik team
 answered on 03 Mar 2016
1 answer
1.0K+ views

Hi,

Need urgent help.

I am working on radgrid.

<telerik:GridBoundColumn SortExpression="BPMTempCheck" HeaderText="BPMTempCheck" AllowSorting="false"
                            HeaderButtonType="TextButton" DataField="BPMTempCheck" UniqueName="BPMTempCheck"
                            CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="75px" Display="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn SortExpression="ActionType" HeaderText="ActionType" AllowSorting="false"
                            HeaderButtonType="TextButton" DataField="ActionType" UniqueName="ActionType"
                            CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="75px" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Shop Code" UniqueName="ShopCode">
                            <ItemTemplate>
                                <asp:TextBox ID="txtShopCode" runat="server"></asp:TextBox>                                                                                                
                            </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="Reporting Unit" UniqueName="ReportingUnit">
                            <ItemTemplate>
                                <asp:TextBox ID="txtReportingUnit" runat="server"></asp:TextBox>
                            </ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn>
                            <ItemTemplate>
                                <asp:Button ID="btnUploadGRS" runat="server" Text="Upload to GRAPE" OnClick="btnUploadGRS_Click" />
                            </ItemTemplate>
</telerik:GridTemplateColumn>

 

i want to fetch the row index and the other columns details on onClick event of the button "btnUploadGRS_Click". I want to fetch the details of the row in which button is clicked.

How can i get the details in the code behind file.

 

Thanks

Amit

Vessy
Telerik team
 answered on 02 Mar 2016
1 answer
168 views

Hi!

I am transfering some standalone .aspx pages (with telerik controls such as radButtons, radHtmlCharts, radCodeBlocks etc.) to pages that use a master page file for common layouting.

I am facing an issue with AjaxManager and AjaxLoadingPanel, activated when the user clicks on a RadHtmlChart series to drill down. This was working just fine when the page was implemented as standalone however it stopped working when tried to bind the page to a master page file.

What i exactly try to achieve is to have a chart loaded in a AjaxLoadingPanel on its series click event. I have also mupltiple RadHtmlCharts in my page so the only way to load each chart separately (on its series click event) is to have some hidden buttons in my page,passing some ajaxRequestWithTarget values to vode behind.

Since i am using a master page, i use an RadAjaxManagerProxy in my .aspx page for managing telerik control ajax update actions.

So here is my master page code:

<%@ Master Language="VB" AutoEventWireup="true" CodeFile="DashboardMaster.master.vb" Inherits="DashboardMaster" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html>
 
<head runat="server">
    ...
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
 
    ...
 
    <form id="form1" runat="server">
 
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnablePartialRendering="true">
                <Scripts>
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                    <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
                </Scripts>
            </telerik:RadScriptManager>
             
            <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            </telerik:RadAjaxManager>
 
            <div>
                <asp:ContentPlaceHolder id="MainContent" runat="server">
         
                </asp:ContentPlaceHolder>
            </div>
    </form>
    ...

And here is the .aspx page relevant code:

<%@ Page Title="" Language="VB" MasterPageFile="~/Dashboard2/DashboardMaster.master" AutoEventWireup="true" CodeFile="CorporateView3.aspx.vb" Inherits="CorporateView3" %>
...
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadButtonAverageImageResolutionOfCountries">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadHtmlChartAverageImageResolutionOfCountries" LoadingPanelID="AjaxLoadingPanel1" />
                    </UpdatedControls>
            </telerik:AjaxSetting>
            ...
             
    </telerik:RadAjaxManagerProxy>
    ...
    <telerik:RadCodeBlock ID="RadCodeBlock65" runat="server">
        <script type="text/javascript">
            function AverageImageResolutionOfCountriesOnClientSeriesClicked(sender, args) {
                var btn1 = $find("<%=RadButtonAverageImageResolutionOfCountries.ClientID%>");
                if (args.get_seriesName() !== "Sites") {
                    btn1.set_commandName(args.get_category());
                    $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>').ajaxRequestWithTarget("RadButtonAverageImageResolutionOfCountries", "");
                }
            }
        </script>
    </telerik:RadCodeBlock>
    ...
    <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Skin="BlackMetroTouch">
    </telerik:RadAjaxLoadingPanel>
    ...
    <div style="display: none;">
        <telerik:RadButton ID="RadButtonAverageImageResolutionOfCountries" runat="server" Text="RadButtonAverageImageResolutionOfCountries" OnClick="RadButtonAverageImageResolutionOfCountries_Click" />
    </div>
    ...
    ...
    <div class="col4">
        <telerik:RadHtmlChart runat="server" ID="RadHtmlChartAverageImageResolutionOfCountries" Skin="Black"  Height="280" OnClientSeriesClicked="AverageImageResolutionOfCountriesOnClientSeriesClicked">
                        <Appearance>
                            <FillStyle BackgroundColor="#262626"></FillStyle>
                        </Appearance>
                        <ChartTitle Text="Average Image Resolution">
                            <Appearance>
                                <TextStyle Color="#7f7f7f" FontSize="18" FontFamily="Arial,sans-serif" Margin="5 0 40 0" Padding="0" Bold="true" Italic="false" />
                            </Appearance>
                        </ChartTitle>
                        <Legend>
                            <Appearance Visible="false" />
                        </Legend>
                        <PlotArea>
                            <Appearance></Appearance>
                            <Series>
                                <telerik:ColumnSeries Name="Countries" DataFieldY="AverageImageResolution">
                                    <TooltipsAppearance DataFormatString="{0:0,0.00}" />
                                    <LabelsAppearance Visible="true" DataFormatString="{0:0,0.00}" Color="#b5acac" />
                                    <Appearance FillStyle-BackgroundColor="#336ca6" Overlay-Gradient="None"></Appearance>
                                </telerik:ColumnSeries>
                            </Series>
                            <XAxis DataLabelsField="Country" Color="#8f8686">
                                <MajorGridLines Color="#424040" Width="1" Visible="true"></MajorGridLines>
                                <MinorGridLines Color="#343333" Width="1" Visible="true"></MinorGridLines>
                            </XAxis>
                            <YAxis Color="#8f8686">
                                <LabelsAppearance DataFormatString="{0}" />
                                <MajorGridLines Color="#424040" Width="1" Visible="true"></MajorGridLines>
                                <MinorGridLines Color="#343333" Width="1" Visible="true"></MinorGridLines>
                            </YAxis>
                        </PlotArea>
         </telerik:RadHtmlChart>
    </div>
     
</asp:Content>

As you can see there is an RadHtmlChart: RadHtmlChartAverageImageResolutionOfCountries in the page, triggering AverageImageResolutionOfCountriesOnClientSeriesClicked when a series item is clicked.

This jscript function is triggering: ajaxRequestWithTarget(RadButtonAverageImageResolutionOfCountries...) which updates the radHtmlChart using AjaxLoadingPanel1. 

The code called on button "click" is:

Protected Sub RadButtonAverageImageResolutionOfCountries_Click(ByVal sender As Object, ByVal e As EventArgs)
        'Execute some server logic
        System.Threading.Thread.Sleep(2000)
         
        Dim seriesNameRes As String = RadHtmlChartAverageImageResolutionOfCountries.PlotArea.Series(0).Name
 
        If seriesNameRes = "Countries" Then
            Dim CountryRes As String = (RadButtonAverageImageResolutionOfCountries.CommandName).ToString
            RadHtmlChartAverageImageResolutionOfCountries.PlotArea.XAxis.DataLabelsField = "Site"
            RadHtmlChartAverageImageResolutionOfCountries.PlotArea.Series(0).DataFieldY = "AverageImageResolution"
            RadHtmlChartAverageImageResolutionOfCountries.PlotArea.Series(0).Name="Sites"
            RadHtmlChartAverageImageResolutionOfCountries.DataSource = GetAverageImageResolutionOfEntitiesSelectedParentTimeSpan("Sites", CountryRes, FromDateValue, ToDateValue)
            RadHtmlChartAverageImageResolutionOfCountries.DataBind()
         
        End If       
 
End Sub

The logic above used to work just fine, however is stopped working when start using a master page file

Now when the user clicks on a series item event if jscript function is called (AverageImageResolutionOfCountriesOnClientSeriesClicked), the page get fully refrershed.

AjaxLoadingPanel is not working any more and the code behind is not called at all (RadButtonAverageImageResolutionOfCountries_Click not called).

Any ideas of what i may be missing?

Maria Ilieva
Telerik team
 answered on 02 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?