Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
172 views
Hi. I have a table in my database to register the dates one person is available in the office. In this table I have the weekday (Monday, etc) and start and end time with no specific date.
How i can get this data to my RadScheduler programatically because I filling it  using ObjectDataSource via code?

TIA
Yamil
Yamil
Top achievements
Rank 1
 answered on 09 Jun 2008
1 answer
98 views
Hi,
I have v. Q4 2006 so no Proxy Manager at my disposal, also, in this instance (contrary to Telerik recommendations of putting the Ajax Manager in the master Page, i have had to put it in the Content page)
on the override of the pageInit,..
The problem is ...
 when I try find the AjaxManager control  now (before in a non MPage scenario it was fine)  ..
with..

RadAjaxManager ajaxManager = (RadAjaxManager)Page.FindControl("RadAjaxManager1");

it comes up null  (not found) and of course I cannot set my ajax settings.

TIA
Neal

Mishel
Top achievements
Rank 1
 answered on 09 Jun 2008
1 answer
171 views
I have an application using the tab strip in a very similar way to what is being done in the load on demand demo.

When I place a RadScriptBlock in any tab other than the first I am getting a Javascript "Syntax error" in IE7.  I've tested it in Firefox and there is no error.

Is there a fix available for this?

Thanks
Helen
Telerik team
 answered on 09 Jun 2008
2 answers
122 views
What is the style declaration to set the alignment of the expand image in a panelbaritem, or to set the height of the panelbaritem?  It seems that the expand image is aligned at the top of the panelbaritem, and the text of the item is aligned at the bottom - looks very funky.  I can't figure out what to edit to fix that...?  I can send a screenshot, but it looks like I can't actually attach anything to a post here...

Thanks!  Eddie
Software
Top achievements
Rank 1
 answered on 09 Jun 2008
1 answer
107 views
Please elaborate on how to localize the RadUpload control in its latest incarnation. I have previously been able to to this successfully with the ASP.NET version but not with the ASP.NET AJAX version.

Svein Roald
Veselin Vasilev
Telerik team
 answered on 09 Jun 2008
3 answers
222 views
Is it possible to change the text / wording on the AddButton either in the designer or at runtime?
Veselin Vasilev
Telerik team
 answered on 09 Jun 2008
1 answer
113 views

Hi,

I am using Radgrid inside RadAjaxPanel. I supposed to show two different tooltips on Radgrid cell click event.

when i clcik on the grid i have add the target control id and tooltip data.
 so i added onemore RadAjaxpanel and it has two RadtooltipManager.

RadAjaxpanel1   -- Radgrid,Radcombo

RadAjaxpanel2   -- RadToolTipManger1 &  RadToolTipManger2

I am adding those target control id and data in raisepostback event.  when i click in the cell am getting the below error

Error: Sys.InvalidOperationException: Two components with the same id 'xxx' can't be added to the application.
could you please help me to resolve this issue.

-Dhana

 

Svetlina Anati
Telerik team
 answered on 09 Jun 2008
3 answers
202 views
Hi!

Im trying to set up a simple Excel export using radgrid. I'm able to export to csv format, pdf, and excel with the Html option. When I try to use ExportToExcel with ExcelML I get  the headers and all the rows are empty.

I tried using an XmlDataSource, then I tried using OnNeedDataSource and setting this to a simple array. Still, I can export to all the formats except ExcelML.

I set the RadGrid1_ExcelMLExportRowCreated event and all the e.Row.Cells are empty.

Any Idea what can be wrong?
Konstantin Petkov
Telerik team
 answered on 09 Jun 2008
1 answer
193 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
131 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?