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

Hi,
My query is regarding Rad Editor.
The problem is when I create a custom commands in rad editor to apply styles to content as font size, font type etc.,.
But at the same when I try to apply CSS class to content it is not working for me.
Below is my Code


Below is the code working

EditorCommandList["Mandatory"] = function (commandName, editor, args) {

            if (editor.getSelectionHtml() != "") {
                editor.fire("FontSize", { value: "40" });
}
}

Below is the code not working

EditorCommandList["GuideLines"] = function (commandName, editor, args) {

            if (editor.getSelectionHtml() != "") {

                editor.fire("ApplyClass", { value: "radGuideLines " });

}
}

In the above code when i try apply a class using "ApplyClass" command it is not working.

Please provide me solution ASAP.

 

Thanks

 

 

Nikolay
Telerik team
 answered on 12 Feb 2016
1 answer
140 views

Hi!

I am trying to build a page using multiple radHtmlCharts, all of them with drill down functionality.

Followed the steps described in the demo page: http://demos.telerik.com/aspnet-ajax/htmlchart/examples/drilldownchart/defaultvb.aspx?show-source=true

I am using onClientSeriesClicked event and the AjaxRequest event of the Ajax Manager to force drill down. As far as i understand I can have only one Ajax Manager in my page and all of my htmlCharts points to the same AjaxRequest.

Here is the code (sample) in my .aspx page:

    <head runat="server">
    ...

        <script src="script.js" type="text/javascript"></script>
    </head>

    ...
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
             <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadHtmlChartAverageImageResolutionOfCountries" LoadingPanelID="AjaxLoadingPanel1" />
             </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
             <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="RadHtmlChartAverageComplianceOfCountries" LoadingPanelID="AjaxLoadingPanel1" />
             </UpdatedControls>
       </telerik:AjaxSetting>
        ...
    </telerik:RadAjaxManager>
 
 <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Skin="BlackMetroTouch">
 </telerik:RadAjaxLoadingPanel>
 
 <telerik:RadCodeBlock ID="RadCodeBlock65" runat="server">
    <script type="text/javascript">
        function getAjaxManager()
            {
                 return $find("<%=RadAjaxManager1.ClientID%>");
            }
    </script>
 </telerik:RadCodeBlock>
    ...
    <div class="col4">
 
            <telerik:RadHtmlChart runat="server" ID="RadHtmlChartAverageImageResolutionOfCountries" OnClientSeriesClicked="AverageImageResolutionOfCountriesOnClientSeriesClicked" Skin="Black"  Height="280"
          <Appearance>
     <FillStyle BackgroundColor="#262626"></FillStyle>
  </Appearance>
  <ChartTitle Text="XXXXX1"></ChartTitle>
   <PlotArea>
    <Series>
      <telerik:ColumnSeries Name="Countries" DataFieldY="AverageImageResolution">

       ...

      </telerik:ColumnSeries>
   </Series>
   <XAxis DataLabelsField="Country">
   </XAxis>
   <YAxis>
   </YAxis>
 </PlotArea>
 </telerik:RadHtmlChart>
    </div>
    ...
    <div class="chart3">
 <telerik:RadHtmlChart runat="server" ID="RadHtmlChartAverageComplianceOfCountries" OnClientSeriesClicked="AverageComplianceOfCountriesOnClientSeriesClicked"  Skin="Black" Height="300">
   <ChartTitle Text="XXXXXX2">
           </ChartTitle>
   <PlotArea>
     <Series>
      <telerik:ColumnSeries Name="Countries" DataFieldY="Compliance">
                 ...
      </telerik:ColumnSeries>
     </Series>
     <XAxis DataLabelsField="Country">
     </XAxis>
     <YAxis>
     </YAxis>
  </PlotArea>
 </telerik:RadHtmlChart>
   </div>

   ...

 

So, if i try to drill down a specific radHtmlChart  all the other charts are also getting refreshed and if they use the same categories (ColumnSeries: Countries) then they also drill down (if not, then they just load empty).

The script i am using (script.js):

(function (global, undefined) {
    global.AverageImageResolutionOfCountriesOnClientSeriesClicked = function (sender, args) {
        var ajaxManager = global.getAjaxManager();
 
        if (args.get_seriesName() !== "Sites") {
            ajaxManager.ajaxRequest(args.get_category());
        }
 
 
    }
})(window);
 
(function (global, undefined) {
    global.AverageComplianceOfCountriesOnClientSeriesClicked = function (sender, args) {
        var ajaxManager = global.getAjaxManager();
 
        if (args.get_seriesName() !== "Sites") {
            ajaxManager.ajaxRequest(args.get_category());
        }
    }
})(window);
 

And in VB code:

Protected Sub RadAjaxManager1_AjaxRequest(sender As Object, e As AjaxRequestEventArgs)
 
        ' Drill down for Average Image Resolution ''''''''''''''''''''''''''''''''''''''''''''''''''''''
        Dim seriesNameRes As String = RadHtmlChartAverageImageResolutionOfCountries.PlotArea.Series(0).Name
        If seriesNameRes = "Countries" Then
             
            Dim CountryRes As String = (e.Argument).ToString
            RadHtmlChartAverageImageResolutionOfCountries.PlotArea.XAxis.DataLabelsField = "Site"
            RadHtmlChartAverageImageResolutionOfCountries.PlotArea.Series(0).DataFieldY = "AverageImageResolution"
            RadHtmlChartAverageImageResolutionOfCountries.PlotArea.Series(0).Name="Sites"
            RadHtmlChartAverageImageResolutionOfCountries.DataSource = GetAverageImageResolutionOfCountrySites(CountryRes)
            RadHtmlChartAverageImageResolutionOfCountries.DataBind()
         
           End If
         
 
        ' Drill down for Compliance ''''''''''''''''''''''''''''''''''''''''''''''''''''''
        Dim seriesNameCmpl As String = RadHtmlChartAverageComplianceOfCountries.PlotArea.Series(0).Name
        If seriesNameCmpl = "Countries" Then
             
            Dim CountryCmpl As String = (e.Argument).ToString
            RadHtmlChartAverageComplianceOfCountries.PlotArea.XAxis.DataLabelsField = "Site"
            RadHtmlChartAverageComplianceOfCountries.PlotArea.Series(0).DataFieldY = "Compliance"
            RadHtmlChartAverageComplianceOfCountries.PlotArea.Series(0).Name="Sites"
            RadHtmlChartAverageComplianceOfCountries.DataSource = GetAverageComplianceOfCountrySites(CountryCmpl)
            RadHtmlChartAverageComplianceOfCountries.DataBind()
         
           End If
 
        End Sub

How could i refresh only the HtmlChart for which i am calling the onClientSeriesClicked event?

Thanks!

Thanasis

Danail Vasilev
Telerik team
 answered on 12 Feb 2016
1 answer
108 views

I am trying to use RadCloudUploader with Azure Media Services. I need to override the BlobContainer per uploaded file so that I can upload each into their own container in azure blob storage (due to the way Azure Media Services works). I have created a custom provider and custom upload handler but the problem is how to get the azure container name into the AzureProvider Initialize method.

Here is how the processing needs to work:

  1. Get Azure Media Services container name
  2. Upload each selected file into the correct blob container (name comes from step 1)
  3. Do some additional processing after each file has uploaded (database work, additional Azure Media Services API stuff, etc.)

Step 2 is the problem. I just need to be able to specify the container name (not the folder path, as per the Handler's SetKeyName override). Thanks for any help, I've been going a bit crazy on this one.

 
Peter Filipov
Telerik team
 answered on 12 Feb 2016
1 answer
101 views

x axis label alignment not able to set even if i given rotationangle=20 also

 

Please see attached files without angle and with angle images.

 

 

Danail Vasilev
Telerik team
 answered on 12 Feb 2016
15 answers
414 views
Hello,

I have the grid which has groups set programmatically , and that functionality works as needed, subtotals get calculated fine. The grid is fully dynamic. What I need to do, is to have text inside each group footer which would display field name or field value of that group. That text needs to be under the column where group field name is displayed. For example:

ClientID: 1
ProductID: 2
Test 1 10 50
Test 2 20 60
ProductID 2 Total: 30 110
ClientID 1 Total: 30 110

Thanks,
Alex
Konstantin Dikov
Telerik team
 answered on 12 Feb 2016
4 answers
210 views
How can I set the z-index for a custom dialog in the Editor? 

We have a web page with a RadEditor placed inside a RadPane.  A custom dialog has been added to the Editor which loads a java applet.  The problem is when clicking the button to launch the applet, it is appearing behind the RadMenu control on the web page.

I would like to set the z-index of the custom dialog to be higher than the RadMenu.  I tried the suggestion in the following link, but am not having any success... http://www.telerik.com/community/forums/aspnet-ajax/editor/z-index-of-image-manager.aspx

Here is the call for showing the custom dialog...
editor.showExternalDialog
(
  '/TestDevelopment/Controls/EquationEditorStyle.aspx',
  argument,
  620,
  420,
  myCallbackFunction,
  null,
  'Equation Editor',
  true,
  Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
  false,
  true
);

Any suggestions would be greatly appreciated!  Thanks!!
Alejandro
Top achievements
Rank 1
 answered on 11 Feb 2016
6 answers
255 views
I have the following column in my grid

<telerik:GridCheckBoxColumn DataField="staffActive" AutoPostBackOnFilter="true" ShowFilterIcon="false"  DefaultInsertValue="True" FilterControlAltText="Filter Staff Active column" CurrentFilterFunction="EqualTo" CurrentFilterValue="True"  HeaderText="Active" SortExpression="staffActive" UniqueName="staffActive" EditFormColumnIndex="1">
</telerik:GridCheckBoxColumn>

As you can see I have DefaultInsertValue set to True. However when I go to add a new record the checkbox isn't checked, can anyone think of any reason this may be happening? I should be able to set it to checked in my code but I would like to know what I am doing wrong with this.
Pavlina
Telerik team
 answered on 11 Feb 2016
12 answers
207 views

After the last couple patches to Telerik, the legend item click event for the RadHtmlChart is running very slow.  I am using asp.net.   It is slow for the built in click for one chart with no javascript or server code for it.  It is also very slow, and often times out, when capturing OnLegendItemClick event for one of seven charts to set the legend on the other charts to have the same visibility properties.  Is there a way to speed this up?

Here is my javascript for the OnLegendItemClick event.

function OnLegendItemClick(args) {
// hiddenchartClicked prevents any possible looping of click events
// args.preventDefault fixes the problem of the currently clicked item not becoming visible again
// It was making all other charts visible except the clicked one,
// so I set all charts and stopped it from toggling.
if ($('#hiddenchartClicked').val() != "")
return;
var seriesName = args.text;
var visibility = !args.series.visible;
var seriesIndex = args.seriesIndex;
var seriesChart = args.sender.element[0].id
$('#hiddenchartClicked').val(seriesChart);
args.preventDefault();
for (var i = 0; i < 7 ; i++) {
var chartID = "RadDemandChart" + i.toString();
var chart = $find(chartID);
chart._chartObject.options.series[seriesIndex].visible = visibility;
chart.repaint();
}
$('#hiddenchartClicked').val("");
}

Thank you so much.

Danail Vasilev
Telerik team
 answered on 11 Feb 2016
7 answers
180 views

​I tried: chrtBenefitCost.ChartTitle.Text = "Traveler Benefit/Cost Ratio​                                                              Total Societal Benefit/Cost Ratio"

as result i got: Traveler Benefit/Cost Ratio​Total Societal Benefit/Cost Ratio

I tried to &nbsp; but it resulted in strange format

Any suggestions?

 

Danail Vasilev
Telerik team
 answered on 11 Feb 2016
1 answer
83 views

How set the Document Manager button Visible false / display None, on  Hyperlink Manager?

Se attached image...

Vessy
Telerik team
 answered on 11 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?