Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
407 views
I have a piechart, binding data from a storedprocedure. I am getting 2 columns  one is Age and BusinessTotal. Based on Age column data, Color should be showed. Please let me know how to accomplish this.

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart3" Width="300" Height="300" Transitions="true">
                    <Appearance>
                         <FillStyle BackgroundColor="White"></FillStyle>
                    </Appearance>                  
                    <Legend>
                         <Appearance BackgroundColor="White" Position="Right" Visible="false">
                         </Appearance>
                    </Legend>
                    <PlotArea>
                         <Appearance>
                              <FillStyle BackgroundColor="White"></FillStyle>
                         </Appearance>
                         <Series>
                              <telerik:PieSeries DataFieldY="BusinessTotal"  StartAngle="90" >
                                   <LabelsAppearance Visible="false" Position="InsideEnd" DataFormatString="{0:N0}">
                                   </LabelsAppearance>
                                   <TooltipsAppearance Color="White"  DataFormatString="{0:N0}"></TooltipsAppearance>
                         

Databinding : C#
protected void GetBusinessData(string metricName)
        {
                SqlCommand cmdProc = new SqlCommand("[oss].[SelectSalespersonBusinessAge]", SqlConnection);
                cmdProc.CommandType = CommandType.StoredProcedure;
                cmdProc.Parameters.AddWithValue("@LoginName", loginName);
                cmdProc.Parameters.AddWithValue("@MetricYear", metricYear);
                cmdProc.Parameters.AddWithValue("@MetricMonth", metricMonth);

                SqlDataAdapter adp = new SqlDataAdapter();
                adp.SelectCommand = cmdProc;
                adp.Fill(dt);
                RadHtmlChart3.DataSource = dt;
                RadHtmlChart3.DataBind();
                if (dt.Rows[0]["age"].ToString() == "7-12 Months")
                {
                  //Yellow color should be assigned for this part
                  
                }
                if (dt.Rows[1]["age"].ToString() == "12+ Months")
                {
                   //REd for this
                }              
}
Danail Vasilev
Telerik team
 answered on 23 May 2014
2 answers
100 views
Hi,

I am exporting a Grid with images to html. The images are replaced with the url. I have already searched on internet and on Telerik forums if there is any way to show those images in my html, but I could not find a solution. Is it possible?

Regards,
Zaheer
Daniel
Telerik team
 answered on 23 May 2014
2 answers
244 views
I've implemented RadComboBox Load on Demand functionality using the WCF Web Service. This service works fine with the http configuration settings. We now want to make our application secure (https). Please see the  web.config settings and the error message below. 

Web.config Settings:

<system.serviceModel>
            <behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpsGetEnabled="true" httpsGetUrl="" />
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
                  <endpointBehaviors>
                        <behavior name="MyProject.WCFClientsAspNetAjaxBehavior">
                              <enableWebScript/>
                        </behavior>
                  </endpointBehaviors>
            </behaviors>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true">
                  <baseAddressPrefixFilters> 
                                <add prefix="https://www.MySite.com"/>
                </baseAddressPrefixFilters>
            </serviceHostingEnvironment>
            <services>
                  <service name="MyProject.WCFClients" >
<endpoint address="" 
                                                       binding="basicHttpBinding" 
                                                       bindingConfiguration="TransportSecurity" 
                                                      contract="MyProject.WCFClients"/>
                  </service>          
            </services>
            <bindings>
   <basicHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>

Error message:

Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].<br/>System.ServiceModel.ServiceActivationException: The service '/MyProject/WCFClients.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].. ---> System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http].

Appreciate any suggestions in resolving this issue!!
Dimitar Terziev
Telerik team
 answered on 23 May 2014
1 answer
80 views
Hi ,

We are currently using RadEditor in our project.  We customized the Toolbars by removing some tools. I knew that adding or removing tools will automatically disable the built-in context menus. So I added the context menus manually. It worked fine on text that was directly typed into RadEditor. However, if we copied some text from other files and pasted it into RadEditor, the context menu did not show copy, cut and paste menu items when you right-click on the copy-paste text after highlighting. (Cut, Copy and Paste functions on Toolbars and Key board still work well ). After researching, I have learned that the context menus of RadEditor had some issue with IE8 and the issue could be resolved by installing Telerik 2014 Q1 SP1. We did that today but the problem still remains  (copy, cut and paste didn't show up  on context menu on the text that was copied and pasted into RadEditor). I spend some days try to figure out the reason but failed to get right answer (I remember one or two telerik team member said that issue  related privilege/Security. but can we avoid security checking or bypass this privilege be certain way?) . Could anyone have any suggestion?

Thanks in advance.
Ianko
Telerik team
 answered on 23 May 2014
3 answers
626 views
Suppose I have a RadGrid, such as the one in your demo, here: http://demos.telerik.com/aspnet-ajax/grid/examples/programming/filteringtemplatecolumns/defaultcs.aspx.

If I type liz in the Contact name filter box, and select Contains from the filter drop down, I get the three people in the list whose names contain the letters "liz". Pretty obvious.

Now, if I type liz and lin in the Contact name filter box, and select Contains from the filter drop down, I get an empty list, because no names in the list contain the string "liz and lin". Also, not too surprising.

But, if I type liz AND lin in the Contact name filter box (note the upper case AND), and select Contains from the filter drop down, the list contains the full set of names again. This also happens if I enter liz OR lin.

It appears that the RadGrid is trying to treat the uppercase strings AND and OR as a boolean operator, failing, and then punting and returning the entire list. Whatever the reason, this is causing us problems. Our users tend to copy and paste stuff into the filter box, and it is often in upper case, and it sometimes has the word AND or OR in the copied string. This causes the application to behave unexpectedly for them, and leads to complaints.

I haven't been able to find any way to turn this behavior off. Do you have any suggestions?

Thanks for any help.
-Ken
Eyup
Telerik team
 answered on 23 May 2014
1 answer
161 views
Here is the scenario. I have a bound table (batch edit)with 1 dropdown control in the grid.
Depending on which item is selected in the dropdown grid, certain cells are to be either enabled or disabled.
How do I do that?
Eyup
Telerik team
 answered on 23 May 2014
1 answer
76 views
I have a table in MSSQL database which can be loaded to a radgid via sqldatasource. Let's say this is devices table. I have another table where is store device types, for example: desktop,notebook,printer..etc.
Is it possible somehow, to display the conent of devices table, but when adding a new line, or modifying one existing line i would like to choose device type from a dropdownl list (populated form the other table)?

How should i start? I know there is a column type for dropdown list..but should i generate the columns from device table automatically of manually...or whatever :)

Thanks!
Viktor Tachev
Telerik team
 answered on 23 May 2014
1 answer
200 views
Hello,


 In My Grid  . insert sction no scroll bar is showing how to add scroll bar .while click insert section .

Please  Find the Attachment

  
  
Princy
Top achievements
Rank 2
 answered on 23 May 2014
1 answer
140 views
I have a Radtextbox in which i have given Maxlength property for eg:128 ,for English language its not allowing to type more than 128 characters which is fine,but when i select Japanese language and type its allow me to type more than 128 characters ,i dont want this to happen.



Please Suggest.


Thanks
Konstantin Dikov
Telerik team
 answered on 23 May 2014
1 answer
118 views
<%@ Page AutoEventWireup="false" CodeFile="PamTest.aspx.vb" Inherits="PamTest"  %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
 <html>
 <head>
    <title>ASP.NET RibbonBar Demo - Quick Access Toolbar</title>
</head>
<body>
 
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" />
  
     <div class="qsf-demo-canvas">
        <telerik:RadRibbonBar runat="server" ID="RadRibbonBar1" Skin="Windows7" Width="860px">          
            <Tabs>
                <telerik:RibbonBarTab Text="Taxonomies" ToolTip="Taxonomies">
                    <telerik:RibbonBarGroup Text="Taxonomies">
                        <Items>
                            <telerik:RibbonBarSplitButton Text="Test">
                                <Buttons>
                                    <telerik:RibbonBarButton  Text="Test1"/>
                                    <telerik:RibbonBarButton  Text="Test2"/>
                                </Buttons>
                            </telerik:RibbonBarSplitButton>
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                <telerik:RibbonBarTab Text="Collections" ToolTip="Collections">
                     <telerik:RibbonBarGroup Text="Collections">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                 <telerik:RibbonBarTab Text="Indexes" ToolTip="Indexes">
                     <telerik:RibbonBarGroup Text="Indexes">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                 <telerik:RibbonBarTab Text="Research Reviews" ToolTip="Research Reviews">
                     <telerik:RibbonBarGroup Text="Research Reviews">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
                <telerik:RibbonBarTab Text="Audit" ToolTip="Audit">
                     <telerik:RibbonBarGroup Text="Audit">
                        <Items>                           
                           <telerik:RibbonBarButton Text="Open" Value="Open">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Close" Value="Close">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Edit" Value="Edit">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Copy" Value="Copy">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Paste" Value="Paste">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print" Value="Print">
                           </telerik:RibbonBarButton>
                           <telerik:RibbonBarButton Text="Print Preview" Value="Print Preview">
                           </telerik:RibbonBarButton>                                                                         
                        </Items>
                    </telerik:RibbonBarGroup>
                </telerik:RibbonBarTab>
            </Tabs>
        </telerik:RadRibbonBar>
     </div>
  
    </form>
    <form id="form2" runat="server">   
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Silk" EnableRoundedCorners="False" DecoratedControls="All" />
     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdateInitiatorPanelsOnly="true">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="SortLabel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="radGrid1" runat="server" AllowPaging="true"
        AllowSorting="True" GridLines="None">
        <MasterTableView AllowMultiColumnSorting="true">
               <PagerStyle AlwaysVisible="true" />
        </MasterTableView>         
        <SortingSettings SortedBackColor="#FFF6D6" EnableSkinSortStyles="false"></SortingSettings>
        <HeaderStyle Width="100px"></HeaderStyle>
    </telerik:RadGrid>
     
    </form>   
 
</body>
</html>



This is my Code Behind file



Imports Microsoft.VisualBasic
Imports Telerik.Web.UI
 
 
Partial Class PamTest
    Inherits System.Web.UI.Page
 
 
    Public Sub New()
        Dim data As New List(Of MyData)
        data.Add(New MyData With {.MyColumn1 = "aa", .MyColumn2 = "dd", .MyColumn3 = "rr"})
        data.Add(New MyData With {.MyColumn1 = "bb", .MyColumn2 = "yy", .MyColumn3 = "ff"})
        data.Add(New MyData With {.MyColumn1 = "cc", .MyColumn2 = "xx", .MyColumn3 = "dd"})
        radGrid1.DataSource = data
    End Sub
 
 
End Class
 
Class MyData
    Public Property MyColumn1 As Object
    Public Property MyColumn2 As Object
    Public Property MyColumn3 As Object
End Class




My problem is that

radGrid1.DataSource = data


Is giving an unknown entity error and I have no idea why


Thanks



Angel Petrov
Telerik team
 answered on 23 May 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?