Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
190 views
Hello,
I have tooltipified a column in a infragistics UltraWebGrid using the tooltipmanager. When the user hoovers a small icon a tooltip shows up with the following content:

<table cellspacing="0" cellpadding="0" width="370px">  
    <tr> 
        <td>&nbsp;<asp:Image id="Image3" runat="server" ImageUrl="~/images/no_pic.jpg"></asp:Image></td>  
    </tr> 
    <tr> 
        <td colspan="2"><asp:FileUpload id="FileUpload1" Width="370px" runat="server"></asp:FileUpload></td>  
    </tr> 
    <tr> 
        <td colspan="2"><asp:linkbutton id="cmdUploadImage" runat="server" Visible="true" resourcekey="cmdUploadImage" text="Upload" borderstyle="none" cssclass="CommandButton" OnClick="cmdUploadImage_Click"></asp:linkbutton>&nbsp;   
            <asp:LinkButton id="btn_deleteImage" runat="server" CssClass="CommandButton" Visible="true" resourcekey="deleteImage" Text="Delete" BorderStyle="none"></asp:LinkButton>&nbsp;   
              
        </td> 
    </tr> 
</table> 

This is a custom webusercontrol that I have created and the RadToolTipManager loads it the following way:

protected void uwg_rackTypeGrid_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)  
        {  
            Infragistics.WebUI.UltraWebGrid.TemplatedColumn imageColumn =  
                (Infragistics.WebUI.UltraWebGrid.TemplatedColumn)uwg_rackTypeGrid.Columns.FromKey("imageColumn");  
 
            Control target = ((Infragistics.WebUI.UltraWebGrid.CellItem)  
                    imageColumn.CellItems[e.Row.Index]).FindControl("img_rackImage");  
 
            if (!Object.Equals(target, null))  
            {  
                if (!Object.Equals(this.RadToolTipManager1, null))  
                {  
                    Infragistics.WebUI.UltraWebGrid.UltraGridRow myRow = (Infragistics.WebUI.UltraWebGrid.UltraGridRow)e.Row;  
                    //Add the button (target) id to the tooltip manager  
                    this.RadToolTipManager1.TargetControls.Add(target.ClientID, myRow.Cells.FromKey("RackType_ID").ToString(), true);  
                }  
            }  
        } 

and here is my AjaxUpdate even that fires when the user hoovers the small icon:

protected void RadToolTipManager1_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)  
        {  
            this.UpdateToolTip(e.Value, e.UpdatePanel);  
        }  
 
        private void UpdateToolTip(string rowID, UpdatePanel panel)  
        {  
            Control ctrl = Page.LoadControl("~/DesktopModules/STS.POP.WebControls/TT_ImageRackType.ascx");  
            panel.ContentTemplateContainer.Controls.Add(ctrl);  
            STS.POP.WebControls.TT_ImageRackType ttImageRackType = (STS.POP.WebControls.TT_ImageRackType)ctrl;  
            ttImageRackType.RackType_ID = rowID;  
        } 

So far everything works fine, the tooltip is loaded with my custom webusercontrol inside.

The user can then select an image using the standard fileUpload control and then click the cmdUploadImage linkbutton. The problem is that the click is not firing any postback and because of that I can not read any filename from the fileUpload control.

The UltraWebGrid is set to AJAX=false and is firing postbacks when used. So its not the grid. I am not using any ajaxpanel of some sort. So why am I not getting a postback when clicking on the cmdUploadImage button that is inside the toolTip?

Any help would be GREATLY appreciated!

Thank you,
Amer
Svetlina Anati
Telerik team
 answered on 09 Jun 2008
2 answers
125 views
We have a problem witch context menu in RadGrid. After downloading a file context menu is disappearing. Only refreshing the page can fix the menu.

Code example:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="RadGridMenu._Default" %> 
 
<%@ 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>Untitled Page</title> 
</head> 
<body> 
     
     
    <form id="form1" runat="server"> 
     
    <script type="text/javascript"> 
    function RowContextMenu(sender, eventArgs) 
    { 
        var e = eventArgs.get_domEvent(); 
        var index = eventArgs.get_itemIndexHierarchical(); 
         
        document.getElementById('<%=hdnClickedRow.ClientID%>').value = index; 
        menu = $find("<%=RadMenu1.ClientID%>"); 
                
        menu.show(e); 
        e.cancelBubble = true; 
        e.returnValue = false; 
        if (e.stopPropagation) 
        { 
           e.stopPropagation(); 
           e.preventDefault(); 
        } 
    } 
    </script> 
     
    <input type="hidden" id="hdnClickedRow" runat="server" /> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
     
    <telerik:RadGrid ID="RadGrid1" runat="server"  onitemcommand="RadGrid1_ItemCommand"> 
    <MasterTableView> 
        <Columns> 
            <telerik:GridTemplateColumn> 
                <ItemTemplate> 
                    <asp:LinkButton ID="lnkbtn" runat="server" Text="Download File" CommandName="someCMD" /> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
        </Columns>        
         
    </MasterTableView>     
     
    <ClientSettings> 
        <ClientEvents OnRowContextMenu="RowContextMenu" /> 
        <Selecting AllowRowSelect="true" /> 
    </ClientSettings>     
     
    </telerik:RadGrid> 
     
    <telerik:RadContextMenu ID="RadMenu1" Runat="server" ContextMenuElementID="none"> 
    <Targets> 
        <telerik:ContextMenuControlTarget ControlID="RadGrid1" /> 
    </Targets> 
    <Items> 
        <telerik:RadMenuItem Text="abc abc abc" Value="abc abc abc1" /> 
        <telerik:RadMenuItem Text="abc abc abc" Value="abc abc ab2c" /> 
        <telerik:RadMenuItem Text="abc abc abc" Value="abc abc abc3" /> 
        <telerik:RadMenuItem Text="abc abc abc" Value="abc abc abc4" /> 
        <telerik:RadMenuItem Text="abc abc abc" Value="abc abc abc5" /> 
    </Items>     
    </telerik:RadContextMenu> 
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" /> 
    </form>     
     
</body> 
</html> 
 

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.IO; 
using System.Text; 
 
namespace RadGridMenu 
{ 
    public partial class _Default : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if (!IsPostBack) 
            { 
                RadGrid1.DataSource = Enumerable.Range(0, 10); 
                RadGrid1.DataBind(); 
            } 
        } 
 
        private void DownaloadFile()  
        { 
            string fileToDownload = Path.Combine(Server.MapPath("."), "aaa.txt"); 
 
 
            using (FileStream oFile = new FileStream(fileToDownload, FileMode.Open)) 
            { 
                HttpContext.Current.Response.Clear(); 
                HttpContext.Current.Response.ContentType = "text/html"; 
                HttpContext.Current.Response.HeaderEncoding = Encoding.Default; 
                HttpContext.Current.Response.AddHeader("Content-disposition", "attachment; filename=file.txt"); 
 
                using (BinaryReader br = new BinaryReader(oFile)) 
                { 
                    byte[] buff = new byte[51200]; 
                    int numOfRead = 0; 
                    while ((numOfRead = br.Read(buff, 0, buff.Length)) > 0) 
                    { 
                        HttpContext.Current.Response.OutputStream.Write(buff, 0, numOfRead); 
                    } 
                } 
                HttpContext.Current.Response.End(); 
            } 
        } 
 
        protected void RadGrid1_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) 
        { 
            if (e.CommandName == "someCMD") 
            { 
                DownaloadFile(); 
            } 
        } 
 
        protected void Button1_Click(object sender, EventArgs e) 
        { 
            DownaloadFile(); 
        } 
    } 
} 
 
 

What can we do to fix it?
Nowicki Sebastian

Jakub Wilk
Top achievements
Rank 2
 answered on 09 Jun 2008
3 answers
133 views
I have an combobox with loadondemnand, this works perfect, when the user clicks the combobox .

now, i have to set the text of the combobox in code-behind (preselect)

radcombobox.text = "Basketball"

How can i call now the itemsrequest methode correct, with the argument of the 
RadComboBoxItemsRequestedEventArgs ?

protected void ddlSport_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs

Simon
Telerik team
 answered on 09 Jun 2008
1 answer
164 views
I am using the RadMenu Prometheus control and the child items for the radmenu are not showing up.

I used the "Build RadMenu" on the Smart Tag in design view, removed it from my master page into it's own page, am using the RadScriptManager, and have everything as it should be. 

EDIT: Firebug is showing 3 errors...
Sys is not defined
Sys is not defined
Type is not defined

But yet, the child items still do not show on mouseover.  Code below:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
        <telerik:RadMenu ID="RadMenu1" runat="server" Flow="Horizontal"  
            ClickToOpen="false" Skin="Black" > 
            <DefaultGroupSettings Flow="Vertical" ExpandDirection="Auto"></DefaultGroupSettings> 
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> 
            <Items> 
                <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                    Text="Root RadMenuItem1"> 
                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                    Text="Root RadMenuItem2"> 
                    <Items> 
                        <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                            Text="Child RadMenuItem 1"> 
                            <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                            Text="Child RadMenuItem 2"> 
                            <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                        </telerik:RadMenuItem> 
                    </Items> 
                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                    Text="Root RadMenuItem3"> 
                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                    Text="Root RadMenuItem4"> 
                    <Items> 
                        <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                            Text="Child RadMenuItem 1"> 
                            <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                        </telerik:RadMenuItem> 
                        <telerik:RadMenuItem runat="server" ExpandMode="ClientSide"  
                            Text="Child RadMenuItem 2"> 
                            <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                        </telerik:RadMenuItem> 
                    </Items> 
                    <GroupSettings ExpandDirection="Auto" Flow="Vertical" /> 
                </telerik:RadMenuItem> 
            </Items> 
            <ExpandAnimation Type="OutQuart"></ExpandAnimation> 
        </telerik:RadMenu> 

Paul
Telerik team
 answered on 09 Jun 2008
4 answers
162 views
Hello, I have a page with a listbox showing some time selections ('This Month', 'This Year', etc.) and a grid showing the appropriate events. By default, the page shows this month's events.

The listbox drives the grid on postback. Let's say I click 'This Year'. The grid rebinds to show all events for this year. But when I click the back button, the grid goes back to show 'This month' but the listbox doesn't - it still shows 'This Year'.

The grid is using AJAX, the listbox isn't.

How can this be fixed? Thanks.
Missing User
 answered on 09 Jun 2008
1 answer
106 views
I am having trouble getting Google Maps to fill the DIV within the RadPane and refill with resizing of the window/container. Does not work in both IE7 and FF.

Detailed CSS instructions would be appreciated.

Thanks James
Tsvetie
Telerik team
 answered on 09 Jun 2008
1 answer
139 views
When a radio button styled with RadFormDecorator has the TextAlign property set to "Left", the button portion of the control wraps to the next line. The expected behavior was that the button and label portion of the RadioButton would be on the same line.

<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
    <div> 
      <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Telerik" /> 
      <asp:RadioButton ID="RadioButton1" runat="server" Text="Test" TextAlign="Left" />      
    </div> 
    </form> 
</body> 
Georgi Tunev
Telerik team
 answered on 09 Jun 2008
1 answer
206 views
Hi,

I want to implement content approval workflow process for RadEditor for Moss.
How can I achieve this? Is there any built in functionality or do we need to write custom logic?
Please let me know ASAP.
George
Telerik team
 answered on 09 Jun 2008
3 answers
180 views
I have a RadComboBox with 2 columns in the EditItemTemplate of a RadGrid's TemplateColumn. It uses streaming through ExternalCallBackPage to get its list data.

1.How do I implement a javascript on client side which updates a seperate column of RadGrid with the entry the user has selected. 

2. The streaming tends to take time to load the data over. Is there any way to ensure that the data passing to this seperate column could be done once the loading is complete even after the user has left the control?

3. Right now the ExternalCallBackPage I'm using is having 5 different RadComboBoxes for streaming to the appropriate screens. Is this safe? Will there be any performance improvment if I shift each of the controls to its own individual page?

Thank you.
Rosi
Telerik team
 answered on 09 Jun 2008
1 answer
148 views
Hi all,
what is the proper way to handle custom images using a custom skin and  asp.net themes?
Some images replace the original, others are in addition.

I would like to have all the skin images into skin folder.

Thanks in advance,
Flavio
Dimo
Telerik team
 answered on 09 Jun 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?