Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
179 views
I have a RadToolTipManager set to AutoToolTipify my page, however, there are many controls on the page with a Title attribute set that I do not want tooltipped. Is there a way to cancel the tooltip creation based on the TargetControlID?

My thinking would be I could do something along these lines:

If e.TargetControlID.Contains("HyperLink1") Then
    'Do actions for tooltip
Else
    e.cancel()
End If

Is there any way to do what I'm hoping to do, or a good way to specify what to Tooltipify based on what the Title attribute is set to?

-Thanks
Marin Bratanov
Telerik team
 answered on 19 Apr 2013
6 answers
212 views
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using Telerik.Web.UI;
using System.Threading;
 
namespace RadTestApp
{
    public partial class SnippetHttpPanel : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void XmlHttpPanel_ServiceRequest(object sender, RadXmlHttpPanelEventArgs e)
        {
            Thread.Sleep(1000);
 
            rgSearchResults.DataSource = GetData();
            rgSearchResults.DataBind();
        }
 
        protected void rgSearchResults_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
        {
            if (e.Item is GridHeaderItem)
            {
                GridHeaderItem gridHeader = e.Item as GridHeaderItem;
 
                RadComboBox sortoptions = (RadComboBox)gridHeader.FindControl("cboSortOptions");
                sortoptions.SelectedIndex = 1;
 
                DropDownList ddl = (DropDownList)gridHeader.FindControl("sortOptions");
                ddl.SelectedIndex = 1;
            }
        }
 
        private List<SnippetResult> GetData()
        {
            List<SnippetResult> results = new List<SnippetResult>();
 
            results.Add(new SnippetResult { DocSequenceNumber = 1, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 2, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 3, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 4, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 5, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
            results.Add(new SnippetResult { DocSequenceNumber = 6, Title = "Title 1", Snippet = "This is a snippet view text repeated three times.This is a snippet view text repeated three times.This is a snippet view text repeated three times." });
 
            return results;
        }
    }
 
    public class SnippetResult
    {
        public int DocSequenceNumber { get; set; }
        public string Title { get; set; }
        public string Snippet { get; set; }
    }
}
The RadCombobox does not show the selected item in the drop down after a http post using xmlhttp control from telerik. The same works fine with ASP.Net combo box.
Please let me know I can paste sample code.
Boyan Dimitrov
Telerik team
 answered on 19 Apr 2013
6 answers
316 views

Hi,

I am using RADGrid for my application to improve the performance. I am updating the List<Class1> in Webeservice and returning to the client fuinction , But in client script while executing the following line of code in    the   "function updateGrid(result)" - 

set_dataSource(result)

;   throwing error inside Telerik dynamic created script file as 'null object'.

In JavaScript

<script type="text/javascript">  
function bind()  
{  
 
    xtenzasolutions.WebService2.HelloWorld(updateGrid,OnError);  
 
}  
 
function OnError(result)   
    {  
    alert("Error : "+result.get_message());  
    }    
 
 function updateGrid(result)  
    {  
        var tableview= $get('<% = rgDetails.MasterTableView.ClientID %>');  
                 
        tableview.set_dataSource(result);  
             tableview.dataBind();  
                
             GetFirstDataItemKeyValues();  
    }  
      
    function GetFirstDataItemKeyValues()  
 {  
   
   var firstDataItem = $find("<%=rgDetails.ClientID %>").get_masterTableView().get_dataItems()[0];  
   var keyValues =  
     'DisplayStatus: "' +  
      firstDataItem.getDataKeyValue("disp_id") + '"' +  
      ' \r\n' +  
      'RuleName: "' +  
      firstDataItem.getDataKeyValue("url") + '"';  
      alert(keyValues);  
     
 }  
</script> 

In UserControl Page.
<table>  
<tr>  
<td>  
<asp:ScriptManager ID="scrp" runat="server">  
<Services>  
<asp:ServiceReference Path="~/WebService2.asmx" />  
</Services>  
</asp:ScriptManager>  
 
<telerik:RadGrid ID="rgDetails" runat="server" GridLines="None" Skin="Office2007" 
                                    EnableClientKeyValues="true" AutoGenerateColumns="False" AllowMultiRowSelection="false" Height="200px" Width="500px">  
                                    <HeaderContextMenu EnableTheming="True">  
                                      
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
                                    </HeaderContextMenu>  
                                    <MasterTableView>  
                                      
                                        <RowIndicatorColumn>  
                                            <HeaderStyle Width="20px"></HeaderStyle>  
                                        </RowIndicatorColumn>  
                                        <ExpandCollapseColumn>  
                                            <HeaderStyle Width="20px"></HeaderStyle>  
                                        </ExpandCollapseColumn>  
                                        <Columns>  
                                          
                                            <%--<telerik:GridBoundColumn UniqueName="MessageType" SortExpression="MessageType" HeaderText="" DataField="MessageType"></telerik:GridBoundColumn>--%>  
                                            <telerik:GridTemplateColumn HeaderText="" UniqueName="Image">  
                                                <ItemTemplate>  
                                                    <asp:Image runat="server" ID="ImageThumbnail" AlternateText="image" ImageUrl='' Height="25" 
                                                        Width="25" Style="border-width: 0px;" />  
                                                </ItemTemplate>  
                                            </telerik:GridTemplateColumn>  
                                            <telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" UniqueName="Activity" SortExpression="Activity" 
                                                HeaderText="Activity" DataField="u_id">  
                                             <ItemStyle HorizontalAlign="Left" />  
                                            </telerik:GridBoundColumn>  
                                            <telerik:GridTemplateColumn AllowFiltering="false" UniqueName="Install" HeaderText="Status">  
                                                <ItemTemplate>  
                                                     
                                                        <%#DataBinder.Eval(Container.DataItem, "disp_id")%></a></ItemTemplate>  
                                            </telerik:GridTemplateColumn>  
                                            <telerik:GridBoundColumn UniqueName="InstallStatus" SortExpression="InstallStatus" 
                                                HeaderText="" DataField="url" Visible="false">  
                                            </telerik:GridBoundColumn>  
                                        </Columns>  
                                    </MasterTableView>  
                                    <FilterMenu EnableTheming="True">  
                                        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>  
                                    </FilterMenu>  
                                </telerik:RadGrid>  
 
</td>  
</tr>  
<tr>  
<td>  
<asp:Button runat="server" ID="butt" te="click" OnClientClick="bind()" />  
</td>  
</tr>  
</table> 

In Webservice
public List<Class1> HelloWorld()  
 
{  
 
string constr = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;  
 
SqlConnection con = new SqlConnection(constr);  
 
con.Open();  
 
SqlDataAdapter adp = new SqlDataAdapter("select *from urlTable", constr);  
 
DataSet ds = new DataSet();  
 
adp.Fill(ds, "tab");  
 
con.Close();  
 
List<Class1> obj = new List<Class1>();  
 
int i = 0;  
 
foreach (DataRow rw in ds.Tables[0].Rows)  
 
{  
 
Class1 ser = new Class1();  
 
ser.UID = rw["u_id"].ToString();  
 
ser.DISPID = rw["disp_id"].ToString();  
 
ser.URL = rw["url"].ToString();  
 
obj.Add(ser);  
 
}  
 
return obj;  
 
}  
 
Tsvetoslav
Telerik team
 answered on 19 Apr 2013
3 answers
419 views
Hi,

I am developing telerik asp.net ajax proejct using .net 4.0 and vs 2012. All the controls are working fine in development environment, but it is working same (esp RadSlider & RadRadialGuage controls) after i deploy in the testing server(Windows server 2008 r2, iis 7.5). Find below my web.config file.
I really appreciate your help.

Thanks,
Jay

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
    <connectionStrings>
      <add name="AppConStr" connectionString="Server=xxx.xxx.x.xx,1433;Database=xxxDb;User ID=xx;Password=xx;Trusted_Connection=True;Integrated Security=False" providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
      <customErrors mode="Off">
        <!--<customErrors mode="On" defaultRedirect="ConstructionsPage.html" >
            <error statusCode="403" redirect="ConstructionsPage.html"/>
            <error statusCode="404" redirect="ConstructionsPage.html"/>-->
      </customErrors>
      <globalization enableClientBasedCulture="true" culture="auto:en-GB" uiCulture="auto:en" />
      <compilation debug="true" targetFramework="4.0">
        <assemblies>
          <add assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
          <add assembly="Microsoft.ReportViewer.Common, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845DCD8080CC91" />
          <add assembly="Microsoft.Build.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        </assemblies>
        <buildProviders>
          <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
        </buildProviders>
      </compilation>
      <pages>
        <controls>
          <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
        </controls>
      </pages>
      <httpHandlers>
        <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" 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>
      <httpModules>
        <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
        <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />
      </httpModules>
    </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadUploadModule" />
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
      <remove name="RadCompression" />
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
    </modules>
    <handlers>      
      <remove name="ChartImage_axd" />
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_Web_UI_DialogHandler_aspx" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_RadUploadProgressHandler_ashx" />
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
      <remove name="Telerik_Web_UI_WebResource_axd" />
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
      <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
      <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />      
    </handlers>
    <directoryBrowse enabled="true" />
    <staticContent>
      <mimeMap fileExtension=".kml" mimeType="application/vnd.google-earth.kml+xml" />
      <mimeMap fileExtension=".kmz" mimeType="application/vnd.google-earth.kmz" />
    </staticContent>
    <defaultDocument>
      <files>
        <clear />
        <add value="index.html" />
        <add value="Login.aspx" />
        <add value="iisstart.htm" />
        <add value="default.aspx" />
        <add value="index.php" />
      </files>
    </defaultDocument>
  </system.webServer>
</configuration>

Marin Bratanov
Telerik team
 answered on 19 Apr 2013
4 answers
222 views
Hello friends:

My problem is that i have two editing modes in a grid, the two have to call to updateCommand but the first button have to execute one method and the second buttom execute other method.

in the itemCommand i have this code:

if (e.CommandName == "Desasignar")
                {
                    //la condicion indica que si el campo fecha_baja esta vacio se ejecute la linea, si no ya esta dado de baja
                    if (item.Cells[9].Text == " ")
                        (item as GridEditableItem).FireCommandEvent(RadGrid.EditCommandName, "Desasignar");
                }
                if (e.CommandName == "EliminarDispositivo")
                {
                    //la condicion indica que si el campo fecha_baja esta vacio se ejecute la linea, si no ya esta dado de baja
                    if (item.Cells[9].Text == " ")
                        (item as GridEditableItem).FireCommandEvent(RadGrid.EditCommandName, "EliminarDispositivo");
                }

and the UpdateCommand code:

//Si el argumento es desasignar
if(e.CommandArgument == "Desasignar")
{
        .......
}
 
//Si el argumento es Eliminar el dispositivo
if (e.CommandArgument == "EliminarDispositivo")
{
          .......
}


then, in the updateCommand, e.CommandArgument = ""; and i need distinguish the buttom 

Thanks for the help!!
Eyup
Telerik team
 answered on 19 Apr 2013
7 answers
177 views
I am using Telerik Ajax tools in my project. Recently we upgraded the .NET Ajax tools to the latest 2012.3.1308.35 product version. One issue is pertaining to a single page. It is the improper rendering of the Ajax Panel on edit mode. The page looks somewhat like this :

<RadAjaxPanel ....>
    <asp:FormView...... >
        <Header Template >
                User control with certain controls as Edit, Save, Toggle, etc.
        </Header Template>
        <Item Template>
            <Label... />
        </ Item Template >
        <Edit Item Template >
            <Custom Validator... />
                <asp:Button />
            <Rad Editor... />  (It uses the same internal Rad Editor Skin )
         < / Edit Item Template >
    </ Form View>
< / RadAjaxPaneI>

It has two such above mentioned sections. In ReadOnly Mode, the page looks fine but when the FormView is changed to Edit mode for the FIRST TIME, the entire panel becomes too wide to be enclosed within the screen, all the save, edit etc buttons on the right top corner of the panel is not visible as the panel extends invariably towards the right. We have a toggle button on the left top corner which minimises or maximises the panel ( by default panel is maximised ). After this, if we minimise the panel and maximize again, everything becomes fine and takes the correct positions with proper width and visible buttons. Later any number of edits wold not affect anyway and will show proper result. 

As I mentioned above, we have two panel sections. This happens for the panel (only one time) which is pushed into edit mode FIRST after the rendering of the page. The other section which is edited second works properly at all times. Even after multiple refreshing of the page, this erroneous behaviour remains the same.

Please help me with this.

    
    
    
Maria Ilieva
Telerik team
 answered on 19 Apr 2013
1 answer
136 views
Hi
     How can I select a row on checkbox column click from client side. Please post a viable solution.
thanks
Allen
Princy
Top achievements
Rank 2
 answered on 19 Apr 2013
1 answer
92 views
Our QA posted this : Date formatting:  When ‘04162013’ is entered, the field will auto-format the entry to reflect ‘04/16/2013’.  If ‘0416/2013’ or ‘04/162013’ is entered….the field flags the entry as an error and will not auto-format

Is there anything I can do using JavaScript and such ?
Angel Petrov
Telerik team
 answered on 19 Apr 2013
1 answer
99 views
Hi
   How can I hide filter row on editing radgird. thanks for your reply in advance
Savyo
Shinu
Top achievements
Rank 2
 answered on 19 Apr 2013
1 answer
105 views
I am getting this error is Azure only. When running locally the program executes as expected. Any thoughts?
SCRIPT5022: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9cbdec3-c810-4e87-846c-fb25a7c08002%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen-US%3abcbc5876-5d5e-4774-955e-2ecda3d55cd3%3a16e4e7cd%3af7645509%3a22a6274a%3aed16cbdc, line 15 character 16485

Here is the ASPX

<form id="dsxWeb_Login" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <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" OnAjaxRequest="loginClicked">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="loginMessage"/>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
            <telerik:RadCodeBlock ID="cb1" runat="server">
                <script type="text/javascript">
                    function invokeAjax()
                    {
                        try
                        {
                            var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
                            ajaxManager.ajaxRequest();
                        }
                        catch (err)
                        {
                            alert(err);
                        }
                    }
                </script>
            </telerik:RadCodeBlock>
            <div id="login">
                <div id="loginLogo"></div>
                <div id="loginProducts">
                    <ul>
                        <li><input type="checkbox" id="chkLoginFM" runat="server"/>Forecast Management</li>
                        <li><input type="checkbox" id="chkLoginRP" disabled="disabled" runat="server" />Requirements Planning (Coming Soon...)</li>
                    </ul>
                </div>
                <div id="loginForm">
                    Username:<br />
                    <input id="txtUsername" class="loginInput" runat="server"/><br /><br />
                    Password: <br />
                    <input id="txtPassword" class="loginInput" type="password" runat="server"/><br />
                    <input type="button" ID="btnLogin" onClick="invokeAjax(); return false;" Value="Login" />
                    <br />
                     
                </div>
               <div id="loginMessage" runat="server"><strong>Please enter login credentials.</strong></div>
            </div>
             
             
 
        </form>



Genady Sergeev
Telerik team
 answered on 19 Apr 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?