Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
2.1K+ views
Hi. How do you show and hide a RadButton from the client side using javascript? Thanks.

Daniel
Brian Azzi
Top achievements
Rank 2
 answered on 12 May 2016
4 answers
288 views

I have used radbutton with  singleclick= true after clicking the button i have set the single click enabled using javascript , then the button is enabled but the UI of button shows as disabled when  autopostback=false . This is not working in telerik verision Q1 2016.

 

<telerik:RadButton ID="singleclickbtn" runat="server" Text="SingleClick" ClientIDMode="Static" SingleClick="true" AutoPostBack="false" OnClientClicked="Click_OnClientClicked"></telerik:RadButton>

 function Click_OnClientClicked(sender, eventArgs) {
                   $find("singleclickbtn").enableAfterSingleClick();
                }

Augie
Top achievements
Rank 1
 answered on 12 May 2016
5 answers
143 views

Hello,

there is an issue with the mentioned control which case the application to be terminated

To get the error please do the below:

1- Set Culture Property to any Arabic (Ex: ar-EG)

2- Set Mask to "c"

3- Set MaskType to Numeric

4- Run your windows application.

5- Select all the content of the RadMaskedEditBox

6- Start Type any number

You will get an error message and the application will be closed, this issue exists in the Demos which comes with the installation package

Hristo
Telerik team
 answered on 12 May 2016
2 answers
1.1K+ views

I went to update one of our Web Apps on our testing server and all of a sudden I started getting the "Uncaught ReferenceError: Telerik is not defined" Error.  The server is running MWS 2003 R2.  IIS is 6.  .net runtime version is 4.0.  Telerik version is 2016.2.504.40

 

I know this has something to do with the Telerik.Web.UI.WebResource.axd file but for the life of me I can't put my finger on it.  Here is my web.config file:

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
   <appSettings>
   </appSettings>
   <connectionStrings>
   </connectionStrings> 

  <system.web>
    <httpRuntime requestValidationMode="2.0" maxRequestLength="4096" executionTimeout="60" />
    <compilation debug="false" strict="false" explicit="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Web.RegularExpressions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Drawing.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Management, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Data.Services.Client, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
      <buildProviders>
        <add extension=".asbx" type="Microsoft.Web.Services.BridgeBuildProvider" />
      </buildProviders>
    </compilation>
    <httpHandlers>
      <add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions" validate="false" />
      <add path="MetaBuilders_DialogWindow.axd" verb="*" type="MetaBuilders.WebControls.DialogHandlerFactory,MetaBuilders.WebControls" validate="false" />
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
    </httpHandlers>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" smartNavigation="false">
      <namespaces>
        <clear />
        <add namespace="System" />
        <add namespace="System.Collections" />
        <add namespace="System.Collections.Specialized" />
        <add namespace="System.Configuration" />
        <add namespace="System.Text" />
        <add namespace="System.Text.RegularExpressions" />
        <add namespace="System.Web" />
        <add namespace="System.Web.Caching" />
        <add namespace="System.Web.SessionState" />
        <add namespace="System.Web.Security" />
        <add namespace="System.Web.Profile" />
        <add namespace="System.Web.UI" />
        <add namespace="System.Web.UI.WebControls" />
        <add namespace="System.Web.UI.WebControls.WebParts" />
        <add namespace="System.Web.UI.HtmlControls" />
        <add namespace="System.Collections.Generic" />
        <add namespace="System.Linq" />
        <add namespace="System.Xml.Linq" />
      </namespaces>
      <controls>
        <!--<add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>-->
        <add tagPrefix="ajax" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add tagPrefix="psp" namespace="Mbccs.WebControls" assembly="Mbccs.WebControls.PersistentScrollPosition, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c6c4e91899893a55" />
        <add tagPrefix="ew" assembly="eWorld.UI, Assembly=2.0.0.2201" namespace="eWorld.UI" />
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
        <add tagPrefix="actk" namespace="AjaxControlToolkit" assembly="AjaxControlToolkit, Version=4.1.7.1213" />
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" />
      </controls>
    </pages>
    <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="UseUri" timeout="60" />
    <authentication mode="Windows" />
    <customErrors mode="Off" defaultRedirect="error.html" />
    <httpModules />
    <!--<customErrors mode="Off" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>-->
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      <remove name="WebServiceHandlerFactory-ISAPI-2.0" />
      <remove name="ChartImage_axd" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
    </handlers>
    <modules runAllManagedModulesForAllRequests="true" />
  </system.webServer>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Microsoft.VisualStudio.Enterprise.AspNetHelper" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <codeBase version="12.0.0.0" href="file:///C:/Program%20Files%20(x86)/Microsoft%20Visual%20Studio%2012.0/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Enterprise.AspNetHelper.DLL" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="AjaxMin" publicKeyToken="21ef50ce11b5d80f" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.8.5172.27703" newVersion="5.8.5172.27703" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

Please help!

SSirica
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 12 May 2016
1 answer
154 views

Hello,

I have created an application that uses the TabStrip.  My application has a Master Page that loads the ASPX page containing the TabStrip.  I have  a RadScriptManager and a RadAjaxManager (EnableAJAX is set to 'true') in my MasterPage.  I've set the "EnableHistory" to "true" for the RadScriptManager, and when the user clicks on a Tab, within the TabClick event, I add a HistoryPoint that stores the Tab's "text" value.  Withing the "OnNavigate" event for the RadScriptManager I can find the TabStrip and MultiPage controls, and I can find the Tab from it's text.  However, when I set the "selected" property of the tab to 'true' nothing happens.  The tab does not get loaded.  What am I doing wrong?  Is there a better way to achieve browser's "Back-button" navigation for the TabStrip that's been ajaxified?

Sample Code:

OnNavigate event for the RadScriptManager:

protected void rsmSiteMaster_Navigate(object sender, HistoryEventArgs e)
{
    string backPage = Server.HtmlEncode(e.State["BackNavigation"]);
 
    ContentPlaceHolder cphTabStrip = (ContentPlaceHolder)Page.Master.FindControl("cphTabStrip");
    RadAjaxLoadingPanel alpTabStrip = (RadAjaxLoadingPanel)Page.Master.FindControl("alpTabStrip");
    RadTabStrip rtabstripTabs = (RadTabStrip)cphTabStrip.FindControl("rtabstripTabs");
    RadMultiPage rmpTabStrip = (RadMultiPage)cphTabStrip.FindControl("rmpTabStrip");
    RadTab tab = rtabstripTabs.FindTabByText(backPage);
    tab.Selected = true;
    tab.DataBind();
 
}

 

This is how I set the HistoryPoint withing the "TabClick" event:

string key = "BackNavigation";
RadScriptManager.GetCurrent(this).AddHistoryPoint(key, e.Tab.Text);

 

Thanks,

Shawn A.

Ivan Danchev
Telerik team
 answered on 12 May 2016
1 answer
219 views
I am using the RadHtmlChart control. I have set the X axis title, as shown below. But in addition to that, I want each column to have its own title or label on the X axis. Is that possible? I can see that the RadHtmlChart control supports 2 Y axes, but it does not appear to support 2 X axes. If it did, I could use the second X axis to display the additional axis labels.
Frank
Top achievements
Rank 1
 answered on 12 May 2016
1 answer
158 views

Hi Team,

I've two questions.

 1) I'm trying to create a radgrid header with multiple columns grouped under a column,similar like below link.

http://demos.telerik.com/aspnet-ajax/grid/examples/columns-rows/columns/multi-column-headers/defaultcs.aspx

 

  <ColumnGroups>
                <telerik:GridColumnGroup HeaderText="Product Details" Name="ProductDetails" HeaderStyle-HorizontalAlign="Center">
                </telerik:GridColumnGroup>

  </ColumnGroups>

I'm getting this below error. I'm using Ajax controls Telerik.Web.UI, v.2011.3.1305.40 (Dev), do this version of telerik controls supports this feature or not?

 

Please suggest some alternative approach.

Type 'Telerik.Web.UI.GridTableView' does not have a public property named 'ColumnGroups'.

2) An alternative for that in Header template I designed a HTML table.

 <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderStyle-Width="250px" AllowFiltering="false" >
                    
                    <HeaderTemplate>
                    <table>
                    <tr>
                    <td colspan="8" style="text-align:center;> 
                        <asp:Label ID="Label10" runat="server" Text=" Unweighted Savings" ></asp:Label>                   
                    </td>                   
                    </tr>
                    <tr>
                    <td>
                    <asp:LinkButton ID="LinkButton2" runat="server" Text=" C&S "   CommandName='Sort' CommandArgument='CS' Font-Underline="true"></asp:LinkButton>                 
                    </td>
                    <td>
                        <asp:LinkButton ID="LinkButton1" runat="server" Text=" M&R "   CommandName='Sort' CommandArgument='MR' Font-Underline="true"></asp:LinkButton>
                    </td>
                    <td>
                        <asp:LinkButton ID="LinkButton3" runat="server" Text=" E&I "  CommandName='Sort' CommandArgument='EI' Font-Underline="true"></asp:LinkButton>
                    </td>
                     <td>
                        <asp:LinkButton ID="LinkButton4" runat="server" Text=" Public Exchange "  CommandName='Sort' CommandArgument='Exchange' Font-Underline="true"></asp:LinkButton>
                    </td>
                     <td>
                        <asp:LinkButton ID="LinkButton5" runat="server" Text=" Private Exchange "   CommandName='Sort' CommandArgument='PrivateExchange' Font-Underline="true"></asp:LinkButton>
                    </td>
                     <td>
                        <asp:LinkButton ID="LinkButton6" runat="server" Text=" Total "   CommandName='Sort' CommandArgument='Total' Font-Underline="true"></asp:LinkButton>
                    </td>
                    </tr>
                    </table>
                    </HeaderTemplate>
                    <ItemTemplate>
                    <table>
                    <tr>
                    <td>
                    <asp:Label ID="Label4" Text='<%# Bind("CS") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label5" Text='<%# Bind("MR") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label6" Text='<%# Bind("EI") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label7" Text='<%# Bind("Exchange") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label8" Text='<%# Bind("PrivateExchange") %>' runat="server" ></asp:Label>
                    </td>
                     <td>
                      <asp:Label ID="Label9" Text='<%# Bind("Total") %>' runat="server" ></asp:Label>
                    </td>
                    </tr>
                    </table>
                    </ItemTemplate>
                    </telerik:GridTemplateColumn>

 

I'm getting my desired output, but when i sort any column , entire column is not highlighted and up/down arrow is not coming.

Unable to filter these columns. inside header template.

Regards

Sai Teja

Viktor Tachev
Telerik team
 answered on 12 May 2016
4 answers
156 views
I'm trying to set up a download link button, but it seems impossible. I keep getting the following error:

InnerException: Cannot convert object of type 'System.Int32' to type 'System.Collections.IDictionary'

FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method
: System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal
StackTrace
:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Cannot convert object of type 'System.Int32' to type 'System.Collections.IDictionary' ---> System.InvalidOperationException: Cannot convert object of type 'System.Int32' to type 'System.Collections.IDictionary' at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) at System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input) at Telerik.Web.UI.GridCommandEventArgsFactory.CreateGridCommandEventArgs(GridItem item, Object commandSource, CommandEventArgs originalArgs) at Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

This is from DotNetNuke's Log Viewer. I have a user control with a RadGrid that contains the RadButton(s) I'm using to make the download links. This control is loaded in various places that wrap the control with an RadAjaxPanel. Even when I switch it to a Panel ajaxified by a RadAjaxManager this issue appears. What does this error mean? I have no means of debugging it.
Konstantin Dikov
Telerik team
 answered on 12 May 2016
1 answer
90 views

I populate a Dataset whith multiple data tables of results, and then I loop through each of the tables to reveal my results.

 

However only the first datatable is used the others are ignored.

 

I have made sure that the lineseries name is the same as the datatable ?

 

Any ideas please ??

 

 

 

foreach (DataTable table in myRunData.Tables)
            {
              
                LineSeries currentLine = new LineSeries();
                lineSeries1.Name = table.TableName;
                lineSeries1.LabelsAppearance.Visible = true;
                lineSeries1.LabelsAppearance.DataFormatString = "y";

                lineSeries1.TooltipsAppearance.Color = System.Drawing.Color.Blue;
                lineSeries1.TooltipsAppearance.DataFormatString = "{0}";

                lineSeries1.DataFieldY = "TimeInSeconds";

                lineSeries1.TooltipsAppearance.ClientTemplate = " #= kendo.parseInt(value/60) #:#= (value%60) # minutes";
                lineSeries1.LabelsAppearance.ClientTemplate = " #= kendo.parseInt(value/60) #:#= (value%60) # minutes";

                lineSeries1.TooltipsAppearance.DataFormatString = "{0:hh:MM:ss}";
                RadHtmlChart1.PlotArea.Series.Add(lineSeries1);
            }
            RadHtmlChart1.DataSource = parkRunData;
            RadHtmlChart1.DataBind();
            if (!RadHtmlChart1.Visible)
            {
                RadHtmlChart1.Visible = true;
            }

Marin Bratanov
Telerik team
 answered on 12 May 2016
1 answer
179 views

I have a line graph
The Y axis are time in seconds.

 

What I want is the legend for each point to be time not seconds

 

lineSeries1.TooltipsAppearance.DataFormatString = "{0}";

its just coming up with numbers though :(
also is there any way of formatting the Y axis, so that instead of seconds I get
5:00 10:00 15:00 20:00 25:00
etc ? which relates to
500 seconds 1000 seconds 1500 seconds 2000 seconds
etc
The data is fed in using a datatable in code behind so dont really want to hard code the times as they could be very variable.
foreach (DataRow row in dt.Rows){CategorySeriesItem item1 = new CategorySeriesItem(); item1.Y = int.Parse(row["TimeInSeconds"].ToString()); lineSeries1.SeriesItems.Add(item1);}
This draws the point, but what I want to be able to do is set the legends and labels for the time

Marin Bratanov
Telerik team
 answered on 12 May 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?