Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
160 views
Hi all!

I have a problem implementing the RadToolTipManager in my solution. Because the panel that contains it should update itself and my tooltip ascx be generated dynamically. He jumps.

I show an example of my scenario:

TEST.ASPX:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="tooltip_demo_test" %>
 
<%@ Register Src="~/tooltip_demo/DynamicToolTip.ascx" TagName="ProductDetails" TagPrefix="uc1" %>
<%@ 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">
 
<head id="Head1" runat="server">
    <title>
        Test Tool Tip
    </title>
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
         
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="pnltotal">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnltotal" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btntest">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="pnltotal" LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
         
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Skin="Windows7" BackColor="Azure" runat="server">
        </telerik:RadAjaxLoadingPanel>
         
        <asp:Panel runat="server" ID="pnltotal">
            <telerik:RadToolTipManager ID="RadToolTipManager1" Width="100" Height="200" OffsetY="-1" HideEvent="ManualClose"
                runat="server" Skin="Windows7" EnableShadow="true" OnAjaxUpdate="OnAjaxUpdate" RelativeTo="Element"
                Position="MiddleRight">
            </telerik:RadToolTipManager>
             
             
            <br />
            <br />
            <asp:Label runat="server" ID="lblfechasel" Font-Size="10px" ForeColor="#CC0000" Font-Names="Verdana"></asp:Label>
            <br />
            <br />
             
            <asp:DataList ID="dlsitems" runat="server" CellPadding="0" CellSpacing="3" RepeatDirection="Vertical" RepeatColumns="1">
                <ItemTemplate>
                    <asp:Table runat="server" CellPadding="5" CellSpacing="0" BorderColor="#E1E1E1" BorderStyle="Solid" BorderWidth="1">
                        <asp:TableRow runat="server" VerticalAlign="Middle">
                            <asp:TableCell runat="server" HorizontalAlign="Left">
                                <asp:Label runat="server" ID="lblvalorsel" Text='<%# Eval("IDsel") %>' Visible="false"></asp:Label>
                                <asp:Label ID="targetControl1" runat="server" Text='<%# Eval("textosel") %>' Font-Size="11px" Font-Names="Verdana" ForeColor="Purple" style="cursor:pointer;"></asp:Label>
                            </asp:TableCell>
                        </asp:TableRow>
                    </asp:Table>
                </ItemTemplate>
            </asp:DataList>
             
            <br />
            <br />
        </asp:Panel>
         
        <asp:Button runat="server" ID="btntest" Text="Actualizar" OnClick="updateDate" />
    </form>
</body>
</html>

TEST.ASPX.VB:
Imports Telerik.Web.UI
Imports System.Data
 
Partial Class tooltip_demo_test
    Inherits System.Web.UI.Page
 
    Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs)
        Me.UpdateToolTip(args.Value, args.UpdatePanel)
    End Sub
 
    Private Sub UpdateToolTip(ByVal elementID As String, ByVal panel As UpdatePanel)
        Dim ctrl As Control = Page.LoadControl("DynamicToolTip.ascx")
 
        Dim details As DynamicToolTip = DirectCast(ctrl, DynamicToolTip)
        details.IDsel = elementID
 
        panel.ContentTemplateContainer.Controls.Add(ctrl)
    End Sub
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim datatablefinal As New DataTable("items")
        Dim colIDsel As New DataColumn("IDsel")
        Dim coltextosel As New DataColumn("textosel")
        datatablefinal.Columns.Add(colIDsel)
        datatablefinal.Columns.Add(coltextosel)
 
        For var1 As Integer = 1 To 3
            Dim fila As DataRow
            fila = datatablefinal.NewRow
            fila.Item("IDsel") = var1
            fila.Item("textosel") = "Over Here No. " & var1.ToString
            datatablefinal.Rows.Add(fila)
        Next
 
        dlsitems.DataSource = datatablefinal.DefaultView
        dlsitems.DataBind()
    End Sub
 
    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        For Each item As DataListItem In dlsitems.Items
            Dim targetControl1 As Label = DirectCast(item.FindControl("targetControl1"), Label)
            Dim lblvalorsel As Label = DirectCast(item.FindControl("lblvalorsel"), Label)
 
            Me.RadToolTipManager1.TargetControls.Add(targetControl1.ClientID, lblvalorsel.Text, True)
        Next
    End Sub
 
    Protected Sub updateDate(ByVal sender As Object, ByVal e As EventArgs)
        lblfechasel.Text = DateTime.Now.ToString("dd 'de' MMMM 'de' yyyy - hh:mm:ss tt")
    End Sub
End Class

And my Dynamic ToolTip

DynamicToolTip.ASCX:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="DynamicToolTip.ascx.vb" Inherits="DynamicToolTip" %>
 
<asp:Table runat="server" CellPadding="30" CellSpacing="0">
    <asp:TableRow runat="server" VerticalAlign="Middle">
        <asp:TableCell runat="server" HorizontalAlign="Center">
            <asp:Label runat="server" ID="lbltextchange" Font-Bold="true"></asp:Label>
        </asp:TableCell>
    </asp:TableRow>
</asp:Table>

DynamicToolTip.ASCX.VB:
Partial Class DynamicToolTip
    Inherits System.Web.UI.UserControl
 
    Dim IDselfinal As Integer
    Property IDsel() As Integer
        Get
            IDsel = IDselfinal
        End Get
        Set(ByVal value As Integer)
            IDselfinal = value
        End Set
    End Property
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Select Case IDsel
            Case 1
                lbltextchange.Text = "Hola Mundo 1"
                lbltextchange.ForeColor = Drawing.Color.FromName("#0066CC")
            Case 2
                lbltextchange.Text = "Hola Mundo 2"
                lbltextchange.ForeColor = Drawing.Color.FromName("#CC0000")
            Case 3
                lbltextchange.Text = "Hola Mundo 3"
                lbltextchange.ForeColor = Drawing.Color.FromName("#006600")
        End Select
    End Sub
End Class

Thank's for All!!

Daniel Castro
Programador de soluciones Avanzadas sobre Web
IngeWeb Soluciones - Colombia
Marin Bratanov
Telerik team
 answered on 19 Dec 2011
4 answers
229 views
Hi,

our website works via https.

images generated by image handler are not displayed in IE9 in RadEditor, although they are ok in ImageEditor preview panel :(
https://localhost/[Our site]/Pages/ImagePHandler.ashx?RID=4

If I manually correct the link to make it look like this:
http://localhost/[Our site]/Pages/ImagePHandler.ashx?RID=4

- everything is ok, but this is weird.

p.s. Firefox is ok in all cases.

What can I do?
Alexander
Top achievements
Rank 1
 answered on 19 Dec 2011
4 answers
247 views
I am having multiple docks of different size ininside a dockzone in a matrix form. The format of the matrices can be small-small-small, medium-small and large in one row.
When a small dock (next or previous to medium dock) is clicked on its handle/grip (intention is to just select the dock NOT to drag), it automatically gets repositioned to the last place in dockzone. If I click on dockbody, it works properly.
I believe this is happening due to client drag/drop events. Can we identify/trap a single click on dock handle?
attachment is the snapshot of dockzone containing docks.

Regards,
Deepak
Slav
Telerik team
 answered on 19 Dec 2011
3 answers
83 views
Found an issue on the following scenario:
1. Radgrid is filled from NeedDataSource event, with GridEditColumn
2. A dropdownlist that will serve as a selective filter for the contents for the radgrid, placed either in the commandtemplate or somewhere else; on dropdownlist selectedindexchange, bind the radgrid according to the selection method
3. Here's the problem
    Radgrid is filled with selected record but when "Edit" is clicked on the current record (item), it will rebind the radgrid from the first load (no filter, ALL record) and the item in Edit is now the "first" item in the record.

Any solution? Thanks.
Milena
Telerik team
 answered on 19 Dec 2011
2 answers
87 views
Hi
and thank you for your perfect supports
im using this link to lock the whole page with AjaxLoadingPanel
www.telerik.com/community/code-library/aspnet-ajax/ajax/how-to-make-a-radajaxloadingpanel-span-over-the-whole-page.aspx

but i have a problem with this sample , when im changing the Page size the image stays where it was and i wanna change the image position with changing the page size and i wanna it always shows at t he center
can someone help me about it??

thank you for your help :)
Pouya
Top achievements
Rank 1
 answered on 19 Dec 2011
7 answers
264 views
I've seen various postings that somewhat discuss the issue of using TFS 2010 to do builds on projects that have Telerik references but nothing that describes specifically what needs to be done so I am seeking clarification. 

I have a VS2010 solution, within it there is a class library project, unit test project, web project and web deployment project.  The web project has a reference to the Telerik Web UI library and while the copy local flag is "true" and the file exists in the local bin directory the physical reference path is a path in my windows profile (Application Data) where hotfix builds are downloaded (via the Telerik VS Extensions).  It should be noted that my bin directory in the web project is not checked into source control.  Local builds obvisouly work fine but TFS builds fail because the Telerik.Web.UI dll cannot be found since it is not there on the build server.  What I am looking for is clarification on exactly what I need to do get the TFS builds to work - I do not have a seperate license for the build server so I don't think installing my license would work without violating licensing agreement.  Also, given that I can dynamically update to the a new hotfix version manually copying over the "updated" dll everytime I get a new version would be a time consuming and manual process.  Can someone please tell me exactly, in step by step detail what is the best approach to getting the TFS builds to work (and with potentical dynamic updates to the referenced Telerik.Web.UI dll version).
Erjan Gavalji
Telerik team
 answered on 19 Dec 2011
3 answers
89 views

Hello,

As I moving through records in a table, I am able to see the records in my messagebox, but unable to see them in my combobox, how do I fix this problem?

 

If currentIndex < dtDonor.Rows.Count - 1 Then

currentIndex += 1

Session(

"CurrentIndex") = currentIndex

C1CountryOrigin.Text = dtDonor.Rows(currentIndex).Item(

 

"CountryOrigin")

MsgBox(dtDonor.Rows(currentIndex).Item(

 

"CountryOrigin"))

End If

Ivana
Telerik team
 answered on 19 Dec 2011
6 answers
112 views
Hi,

We are using RAD Editor for SharePoint version 6.1.7 in SharePoint 2010, after editing the content using some formatting from the toolbar working fine.

But especially with the dropdown values after formatting when the cursor is at the formatted text, If the dropdown (ex. Font Name) that is selected is wrapping on to the next line instead of truncating within the dropdown

This behaviour is not happeing in v 5.3.2 when used within the 2007 Environment

Attaching the screenshot of 5.3.2 and 6.1.7 versions

Thanks
-Roopesh
Rumen
Telerik team
 answered on 19 Dec 2011
12 answers
586 views

I have created a dynamic grid in one of my forms that I am binding to a Datatable. What I want to know is how to add a Delete column, Iv enabled AllowAutomaticDeletes on my gridhow can I dynamically add a GridButtonColumn (its what I have used in all other pages in the app) and assign it to be the Right most column in the grid.  I am adding it in my LoadGrid function, please look at the code, it adds column to the left side of all the columns that are generated and also does not show the Delete image called by the css class "MyImageButton" ??

 

DeleteColumn.ItemStyle.CssClass =

 

"MyImageButton";

I also added code to rebind to the grid in the NeedDataSource event as I read that for dynamically generated grids, the grid needs to be pulled from this event as well. But im adding the GridButtonColumn in the LoadGrid function only and this is called on (!Page.IsPostback). Can someone please tell me the correct way of adding a GridButtonColumn to a dynamically generated grid and how to get the correct order, the right most column and also any insight as to why the "MyImageButton" is not being loaded from codebehind? its working fine on other pages where i define all columns in the aspx page. Please let me know, your helps appreciated.

 

private void LoadGrid()
        {
            try
            {
                  
                GridButtonColumn DeleteColumn = new GridButtonColumn();
                ProuductsGrid.Columns.Add(DeleteColumn);
                DeleteColumn.ButtonType = GridButtonColumnType.ImageButton;
                DeleteColumn.Text = "Delete";
                DeleteColumn.ConfirmDialogType = GridConfirmDialogType.RadWindow; 
                DeleteColumn.ConfirmTitle = "Delete";
                DeleteColumn.ConfirmText = "Delete this Product?";
                DeleteColumn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                DeleteColumn.ItemStyle.CssClass = "MyImageButton";
  
              ProductBL bl = new ProductBL();
              ProuductsGrid.DataSource = bl.GetProductsByClient((Int32)Session["ClientID"]);
              Product.DataBind();
               }
          }
           
          
         protected void ProductGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
            try
            {
              ProductBL bl = new ProductBL();
              ProuductsGrid.DataSource = bl.GetProductsByClient((Int32)Session["ClientID"]);
             Product.DataBind();
            }
            catch (Exception ex)
            {
          throw;
            }
      
        }
}
  

Sebastian
Telerik team
 answered on 19 Dec 2011
2 answers
280 views
Hi!

I need to add a CheckBox to select/deselect all items in a CheckBoxList. The CheckBoxList is in the RadGrid's FormTemplate. My code is like this:
<telerik:RadGrid ID="RadGrid1" runat="server" ... >
   ...
   <MasterTableView ...>
      ...
      <EditFormSettings EditFormType="Template">
         <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
         <FormTemplate>
            <table class="edit-table-rad" cellspacing="2" cellpadding="1" width="100%" border="0">
               ...
               <tr>
                  <td align="left" width="200px">
                     <b>Languages:</b><br />
                     <asp:CheckBox ID="chbSelectAllLanguage" runat="server"
                                   Text="Select All"
                                   ClientIDMode="Static"/>
                  </td>
                  <td>
                     <asp:CheckBoxList ID="cblLanguage" runat="server"
                                       DataSourceID="entityDataSourceLanguage"
                                       DataTextField="LanguageName"
                                       DataValueField="LanguageID"
                                       RepeatColumns="4">
                     </asp:CheckBoxList>
                  </td>
               </tr>
               ...
            </table>
         </FormTemplate>
      </EditFormSettings>
   </MasterTableView>
</telerik:RadGrid>

I tried to get the CheckBox with jQuery by ID or cssclass, but I think that the CheckBox in the RadGrid's FormTemplate is not in the DOM at document.ready time.

Is there a way to select/deselect all CheckBoxList items by selecting/deselecting the single CheckBox in the FormTemplate?
Nikola
Top achievements
Rank 1
 answered on 19 Dec 2011
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?