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

I make a user control and add RadTooltipManager on master page and OnLoad of my control I do next:
    /// <summary>
    /// Tooltip description
    /// </summary>
    public string Description
    {
        get;
        set;
    }   
 
protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
 
        RadToolTipManager tooltipManager;
        tooltipManager = this.Page.Master.FindControl("tooltipManager") as RadToolTipManager;
        if (tooltipManager == null)
        {
            throw new ApplicationException("There are no Tooltip Manager on the page!");
        }           
        tooltipManager.TargetControls.Add(this.hplnkInfo.ClientID,Description,true);          
    }
And when I initialize property Description of my control I see empty tooltip when click on control/
I think TooltipTargetControlCollection.Add(string controlID,string val,bool isClientID) works like "val" is the tooltip which showing by RadTooltipManager near controlID control.
Is it true?
And how can I show different tooltip on different controls using one RadTooltipManager and passing to it tooltip message?

Thank you.
Marin Bratanov
Telerik team
 answered on 17 Jun 2011
1 answer
79 views
Hi,

I have implemented a couple of customized buttons. I have noticed that when the button's functionality is executed that nothing is added to the undo stack (i.e. you cannot undo the action performed with the button). While I know that it is possible to programmatically clear and remove from the undo stack on the client, is there a way for me to programmatically add to the undo stack? I would like to be able to undo the actions that are performed by my custom buttons.

Thanks,
Logan
Rumen
Telerik team
 answered on 17 Jun 2011
4 answers
1.4K+ views
The popup edit window will not load when I have this line of code: "SelectedValue='<%# Bind("LocationID") %>".  My suspicion is because the DropDownList is populating after the control attempts to bind the SelectedValue, but I'm not sure. I have verified that the SelectedValue I am binding is in fact a value that is in the DropDownList. 

Form Template:

       <tr>
            <td>Location:</td>
            <td>
                <asp:DropDownList ID="ddlDevicesLocation" runat="server" SelectedValue='<%# Bind("LocationID") %>'>
                    
                </asp:DropDownList>
            </td>
        </tr>

C# Populate DropDown :: (OnItemDataBound)

protected void DevicesGrid_PopulateFields(object sender, GridItemEventArgs e)
{
            if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
            {
                GridEditFormItem editform = (GridEditFormItem)e.Item;

                // Define fields that we need to work with
                DropDownList locationddl = (DropDownList)editform.FindControl("ddlDevicesLocation");
                DropDownList typeddl = (DropDownList)editform.FindControl("typeddl");
                TextBox PrinterIP = (TextBox)editform.FindControl("PrinterIP");
                TextBox PrinterName = (TextBox)editform.FindControl("PrinterName");
                TextBox PrinterPort = (TextBox)editform.FindControl("PrinterPort");


                // Fill Location DropDown 
                LocationDropDown(locationddl);
}
}


William
Top achievements
Rank 1
 answered on 17 Jun 2011
2 answers
124 views
Hi,
I am using hierarchical gridview of four levels. I want the columns of all tables to be aligned. Currently I am facing issue because of the left most column (containg arrows to expand and collapse). At each level, tables are shifted to right due to that column.
Is there any way to align columns of all four tables (Each child table column should be aligned with parent table column)?
Please reply ASAP...

FYI: I am using telerik 2009 

thanks,
Pooja
Shinu
Top achievements
Rank 2
 answered on 17 Jun 2011
3 answers
313 views
Hi folks,

I'm trying to prompt users to save unsaved fields in pages. The page navigates away even when I call eventArgs.set_cancel(true); 

The idea is that if you type something into the textbox and then click a menu item, you're prompted about the unsaved change.

Could someone point out what I'm missing here? The complete code for the page is shown below.

Thanks,

Ken

<%@ Page Language="VB" AutoEventWireup="false"  %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
 
    <script type="text/javascript">  
        var isDirty = false;  
        var msg = 'This page has unsaved changes.\n\nClick OK to abandon the changes and leave the page.\n\nClick Cancel to stay on the page so you can save your changes.';  
 
        $(document).ready(function() {  
            $(':input').change(function() {  
                if (!isDirty) {  
                    isDirty = true;  
                }  
            });  
 
            //            window.onbeforeunload = function () {  
            //                if (isDirty) {  
            //                 confirm(msg);  
            //                }  
            //            };  
        });  
 
        function doNavigation(targetURL) {  
            if (isDirty == false) {  
                window.location.href = targetURL;  
            }  
            else {  
                if (confirm(msg) == false) {  
                    return false;  
                }  
                else {  
                    window.location.href = targetURL;  
                }  
            }  
        }  
 
        function onClicking(sender, eventArgs) {  
            var item = eventArgs.get_item();  
            var navigateUrl = item.get_navigateUrl();  
            if (navigateUrl && navigateUrl != "#" && isDirty) {  
                var proceed = confirm(msg);  
                if (!proceed) {  
                    eventArgs.set_cancel(true);  
                    return false;  
                }  
            }  
        }                 
    </script> 
 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Web20" OnClientItemClicking="onClicking">  
            <Items> 
                <telerik:RadMenuItem EnableViewState="false" runat="server" NavigateUrl="~/dashboard.aspx" 
                    Text="Dashboard" PostBack="False">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/scheduling.aspx" PostBack="False" 
                            Text="Scheduling" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem PostBack="False" runat="server" NavigateUrl="~/contacts.aspx" 
                    Text="Contacts" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem PostBack="False" runat="server" NavigateUrl="~/items.aspx" Text="Items">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/resetitems.aspx" PostBack="False" 
                            Text="Debug: Reset Items" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/sales.aspx" Text="Sales" PostBack="False" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/purchases.aspx" Text="Purchasing" 
                    PostBack="False" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" Text="Production" NavigateUrl="~/workorders.aspx" 
                    PostBack="False" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/projects.aspx" Text="Projects" 
                    PostBack="False">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/files.aspx" PostBack="False" Text="Files" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/events.aspx" Text="Events" PostBack="False">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/scheduling.aspx" PostBack="False" 
                            Text="Scheduling" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
            </Items> 
        </telerik:RadMenu> 
        <br /> 
        <br /> 
        <br /> 
        <telerik:RadTextBox ID="RadTextBox1" Runat="server">  
        </telerik:RadTextBox> 
    </div> 
    </form> 
</body> 
</html> 
 
Kate
Telerik team
 answered on 17 Jun 2011
4 answers
125 views
Hi,

Within a RadGrid I'd use scrollheight to force the grid to occupy a certain height on the page and the pager would be at the foot of that height.

I'd do it like this:
<ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="389" SaveScrollPosition="False"></Scrolling>
</ClientSettings>

Is there an equivalent way to do this with the RadTreeList?

It would be nice to see some documentation that specifically looks at the things that haven't been copied to the rad tree list from the grid view equivalent....

Best Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 17 Jun 2011
1 answer
99 views
I need some help.  I have a RadGrid with a RadFilter to generate mailing lists.  Once I have filtered RadGrid, can I select the rows based on the filtered results?  

From a mailing list perspective, I want to add each row from the filtered list to another mailing jobs table.   So I want to iterate through the filtered RadGrid to get only the rows from the filtered set.

Can someone give me guidance?    Thanks in advance.
Mira
Telerik team
 answered on 17 Jun 2011
5 answers
112 views
Hi

I am trying to leverage the c# code you have at the following url:

http://www.telerik.com/help/aspnet/grid/grdfilteringfordatetimecolumnwithdataformatstring.html

Whilst there are several syntax errors I have been able to overcome most of them,
but the following line has me stumped:

string currentPattern = (TextBox)filterItem(((Pair)e.CommandArgument).Second).Controls(0).Text;

I get an error which says.

'filterItem is a variable but it is used like a method'.

What is this line supposed to be?

In the process you might want to clean up the other syntax errors too.

TIA
Marin
Telerik team
 answered on 17 Jun 2011
3 answers
175 views
Hello,

I build a class with Telerik Advices to custom filter date.

My RadFilter bind a RadGrid.
I can save filters in a sqlDataBase.

When I choose a value in my custom combo filter date : no problem.
I save it : no problem
I load it the same day : no problem

But if I load it the next day or after : I must select the value, again.
It is very restriction for users which save their filters.
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports Telerik.Web.UI
Imports System.Collections  
  
'ACB - V1.0 - 07 septembre 2010
''' <summary>
''' filter on today or next days or last days''' </summary>
''' <remarks></remarks>
  
Public Class DateFiltre
    Inherits RadFilterDataFieldEditor
  
    Protected Overrides Sub CopySettings(ByVal baseEditor As Telerik.Web.UI.RadFilterDataFieldEditor)
        MyBase.CopySettings(baseEditor)
        Dim editor = TryCast(baseEditor, DateFiltre)
        If editor IsNot Nothing Then
            StartDate = editor.StartDate
         End If
    End Sub
  
    Public Property StartDate() As System.Nullable(Of DateTime)
        Get
            Return m_StartDate
        End Get
        Set(ByVal value As System.Nullable(Of DateTime))
            m_StartDate = value
        End Set
    End Property
    Private m_StartDate As System.Nullable(Of DateTime)
  
    Public Overrides Property DataType() As System.Type
        Get
            Return MyBase.DataType
        End Get
        Set(ByVal value As System.Type)
            MyBase.DataType = value
        End Set
    End Property
  
    Public Overrides Function ExtractValues() As System.Collections.ArrayList
        Dim list As New ArrayList()
        If combo.SelectedIndex = 0 Then
            list.Add(Nothing)
        Else            
            list.Add(DateTime.Parse(combo.SelectedValue))
        End If
        Return list
    End Function
    Private combo As RadComboBox
  
    Public Overrides Sub InitializeEditor(ByVal container As System.Web.UI.Control)        
        Dim currentDate = If(StartDate, Date.Today)
  
        combo = New RadComboBox()
        combo.Items.Add(New RadComboBoxItem("select"))
        combo.Items.Add(New RadComboBoxItem("date+60", currentDate.AddDays(60).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+21", currentDate.AddDays(21).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+20", currentDate.AddDays(20).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+15", currentDate.AddDays(15).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+14", currentDate.AddDays(14).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+10", currentDate.AddDays(10).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+7", currentDate.AddDays(7).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+5", currentDate.AddDays(5).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+2", currentDate.AddDays(2).ToString()))
        combo.Items.Add(New RadComboBoxItem("date+1", currentDate.AddDays(1).ToString()))
        combo.Items.Add(New RadComboBoxItem("date", currentDate.ToString()))
        combo.Items.Add(New RadComboBoxItem("date-1", currentDate.AddDays(-1).ToString()))
        combo.Items.Add(New RadComboBoxItem("date-2", currentDate.AddDays(-2).ToString()))
        combo.Items.Add(New RadComboBoxItem("date-3", currentDate.AddDays(-3).ToString()))
  
        container.Controls.Add(combo)
    End Sub
  
    Public Overrides Sub SetEditorValues(ByVal values As System.Collections.ArrayList)
        If values(0) IsNot Nothing Then
             combo.SelectedValue = values(0).ToString
        End If
    End Sub
End Class

Have you got an idea to find again my selected value ?

Anne
Anne
Top achievements
Rank 1
 answered on 17 Jun 2011
4 answers
111 views
Hi there,

Our users have come across a bug that only seems to effect IE (IE7 8 and 9 tested).

If you type the following over 3 lines:

line 1
line 2
line 3

Select it, then set its font size to say, 12px. So far so good. Now, with it still selected, turn it into a bulleted list. All 3 lines are put under one bullet point, and the following markup is produced:

<ul>
    <
li><span style="font-size: 12px;">line 1<br />
    line 2<br />

    line 3</
span></li>
</
ul>


Whereas, Firefox and Chrome both render:

<ul>
    <
li><span style="font-size: 12px;">line 1</span></li>
   
<li><span style="font-size: 12px;">line 2</span></li>
    <li><span style="font-size: 12px;">line 3</span></li>
</ul>


IE does it properly if you do it the opposite way, first a bullet list, then the font size.

I have just upgraded to Q3 2010 and the problem still exists.

Sorry if this is in the wrong area.

Regards,

RSPCA Victoria
Rumen
Telerik team
 answered on 17 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?